Login
Check-in [666c151f57]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:No fossil started by OCX inherits a CGI request's variables

Purpose: stone, 2026-10-01: Add the workspace failed with "addworkspace: fossil clone failed: no such file: clone". The console runs Workspace.create in its own process. Fossil, finding GATEWAY_INTERFACE, answered `fossil clone` as a CGI request for a file named "clone". Provisioning had the same failure once and was fixed at its own calls (home:); every other path still inherited the request.

Shape: Fossil.run, the one place fossil is started, unsets the CGI variables (Fossil::CGI_ENV: GATEWAY_INTERFACE, REQUEST_METHOD, QUERY_STRING, PATH_INFO, SCRIPT_NAME, REQUEST_URI, CONTENT_LENGTH, CONTENT_TYPE) whenever it keeps this process's environment. With `home` it already started from a clean one.

Origin: opus, on the maintainer's report. Intent: fossil always runs as a command, whoever starts it. Expression: src/ocx/fossil.cr. Demonstrates: spec/ocx/workspace_spec.cr, crystal run ci.cr: - a workspace is created from a process carrying a CGI request's variables; - without the fix the spec fails with the maintainer's exact error, "fossil clone failed: no such file: clone"; - CI green, 234 examples.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UrDxZLxg3rJ9AQNcwDvo3n

Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | ocx | audited | ci
Files: files | file ages | folders
SHA3-256: 666c151f579ab504460b3ad060c48965b23282152cfb9f374eb57563549fbb54
User & Date: opus 2026-10-01 14:23:20.680
Context
2026-10-01
14:36
Terminate works on any workspace, whatever state its making left it in

Purpose: stone, 2026-10-01: the failed Add left "cruft", and the workspace list "doesn't provide a Delete button". Then: "a workspace clean-up is a workspace clean-up, be it made by an errant flow or not". The workspace page refused a directory with no binding, and so did terminate.

Shape: - Terminate is one flow for every workspace. Each step applies to what the workspace has: - refused while a process runs in it; - synced when it is bound; - refused while its clone, if it has one, holds artifacts the repository lacks; - its end noted on its record, if it has one; - then removed. - The workspace page renders for any workspace directory. It shows its definition and a job's Run form when it has a record, its session or the start form, and always Terminate.

Origin: opus, on the maintainer's report. Intent: whatever made a workspace, it can be cleaned up the same way. Expression: src/ocx/cgi.cr, src/ocx/cgi_workspaces.cr. Demonstrates: spec/ocx/console_workspaces_spec.cr, crystal run ci.cr: - a workspace directory with no binding is listed, its page offers Terminate, and Terminate removes it; - a second Terminate says there is none; - bound workspaces terminate as before; - CI green, 234 examples.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UrDxZLxg3rJ9AQNcwDvo3n check-in: 6912141fbe user: opus tags: ocx, audited, ci

14:23
No fossil started by OCX inherits a CGI request's variables

Purpose: stone, 2026-10-01: Add the workspace failed with "addworkspace: fossil clone failed: no such file: clone". The console runs Workspace.create in its own process. Fossil, finding GATEWAY_INTERFACE, answered `fossil clone` as a CGI request for a file named "clone". Provisioning had the same failure once and was fixed at its own calls (home:); every other path still inherited the request.

Shape: Fossil.run, the one place fossil is started, unsets the CGI variables (Fossil::CGI_ENV: GATEWAY_INTERFACE, REQUEST_METHOD, QUERY_STRING, PATH_INFO, SCRIPT_NAME, REQUEST_URI, CONTENT_LENGTH, CONTENT_TYPE) whenever it keeps this process's environment. With `home` it already started from a clean one.

Origin: opus, on the maintainer's report. Intent: fossil always runs as a command, whoever starts it. Expression: src/ocx/fossil.cr. Demonstrates: spec/ocx/workspace_spec.cr, crystal run ci.cr: - a workspace is created from a process carrying a CGI request's variables; - without the fix the spec fails with the maintainer's exact error, "fossil clone failed: no such file: clone"; - CI green, 234 examples.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UrDxZLxg3rJ9AQNcwDvo3n check-in: 666c151f57 user: opus tags: ocx, audited, ci

14:12
Add a workspace gets a Preview button that shows the definition it would post

Purpose: the maintainer, 2026-10-01: "I want to see the built JSON structure before I click Add the workspace", and "a preview button is desired, especially since I don't get any preview of the contents of workspace/plain". No JavaScript.

Shape: - The form has two buttons, Preview first, so Enter in a field previews. - Preview re-renders the form as sent and shows the workspace definition it would post, the template's sandbox included. It also says whether the login would be used or created, and whether the definition goes on a new thread (its title) or a named record. It writes nothing: no account, no thread. - The definition is built by one function, CGI.planned, for both Preview and Add. A record that no post or ticket starts with is refused before anything is created; Add used to refuse it only after. - The Add a workspace page moves to its own file, cgi_add_workspace.cr, keeping cgi_workspaces.cr under the size limit.

Origin: opus, on the maintainer's terminal request. Intent: see exactly what Add the workspace will post before it does. Expression: src/ocx/cgi_add_workspace.cr, src/ocx/cgi.cr, src/ocx/cgi_workspaces.cr, docs/design/modules.json, docs/survey/functionality.json. Demonstrates: spec/ocx/console_workspaces_spec.cr, crystal run ci.cr: - the Preview button is on the form; - a preview with the claude template shows its definition with the workspace read-write, says it uses scout on a new thread "Build", and keeps the form; - a new login is "would create"; - a named record is shown, and a bad record is refused; - no thread and no login are created; - CI green, 233 examples, coverage 96.8%.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UrDxZLxg3rJ9AQNcwDvo3n check-in: 33d6466f64 user: opus tags: ocx, audited, ci

Changes
Unified Diff Side-by-Side Diff Patch
Changes to spec/ocx/workspace_spec.cr.
Changes to src/ocx/fossil.cr.