fix(catalog): exclude workspaces from raw preimages - #425
Merged
schickling-assistant merged 1 commit intoSep 2, 2026
Merged
Conversation
agent-identity: dev3.direct.omp.5wtg9j4p agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.0.11 agent-runtime: OMP 18.0.11 tooling-profile: dotfiles@2161b9c
schickling-assistant
added a commit
that referenced
this pull request
Sep 3, 2026
…427) `.workspace` is runtime-only: the agent owns its contents, nothing declares them, and #425 made the raw preimage capture none of them. The apply side kept requiring every declared workspace fact to already exist in the prepared plane, so the exact repair path the raw preimage exists for became unreachable: a prepared plane built from a raw snapshot has no such directory, and `digest --prepared` failed with inspect prepared workspace fact <prepared>/agents/<host>/<id>/.workspace Caused by: No such file or directory (os error 2) Admission now tolerates an absent directory and keeps every other rule: a directory that IS there must still be a real, empty one, so prepared state cannot smuggle runtime bytes through the declaration plane. The fact itself stays in the projection, so `materialize_projection` republishes it as an empty directory and the applied catalog still satisfies the live invariant that a declared workspace fact is present. The relaxation is uniform across prepared planes rather than raw-only: `catalog digest --prepared` has no raw mode, so the deployer's digest-then-apply sequence cannot express the distinction, and an absent empty directory carries no information the CAS does not already cover — the declared fact is hashed either way. Regression test covers the deployer's shape end to end: raw-snapshot an invalid live plane whose declared workspace is runtime-only, publish valid declaration bytes into that snapshot, and bind the apply to the opaque preimage. Without this fix it reproduces the error above verbatim. The existing workspace-fact test loses its "missing" case, which asserted the contract this fixes. Its remaining "nonempty" rejection is unchanged. agent-identity: dev3.direct.omp.quzh99p3 agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.1.2 agent-runtime: OMP 18.1.2 tooling-profile: dotfiles@9323c3a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Raw-preimage projection recorded each live agent
.workspacedirectory as a typed workspace fact. Snapshot materialization therefore recreated.workspacein the prepared declaration tree, even though it is runtime-only state.Goal
Keep runtime workspace directories out of raw snapshot/digest/apply projections while preserving the live workspace during repair.
Decisions
Verification
Before the source fix, the focused legacy-profile regression failed because
agents/host/worker/.workspaceexisted in the raw snapshot.After:
This lane includes the raw hard-link, CAS, envelope, resume, invalid-profile, and mutable-state cases. The updated legacy-profile case also verifies the live workspace file survives raw apply.
Complexity
No new complexity; this deletes raw workspace discovery and reuses the existing structural exclusion.
Concerns
PR #424 overlaps the raw-preimage transaction and regression files, so merge ordering may require a small semantic rebase.
Friction & bottlenecks
The Nix shell emitted an ignored permission warning for its local trace sink; it did not affect compilation or test execution.
Follow-ups
None.
References
Refs #424.
Posted on behalf of @schickling
agent_identitysessionagent_personaagent_supervisoragent_toolagent_tool_versionagent_runtimetooling_profile