Skip to content

release/0.4: backport #90 (a workspace value has one source; an empty delivered file is broken) - #92

Merged
antoinetoussaint-byte merged 1 commit into
release/0.4from
backport/90-one-source-0.4
Oct 26, 2026
Merged

antoinetoussaint-byte merged 1 commit into
release/0.4from
backport/90-one-source-0.4

Conversation

@antoinetoussaint-byte

Copy link
Copy Markdown
Contributor

Summary

Backports #90 (r144 f1–f3) to release/0.4 with cherry-pick -x: e079312 ← e5f8cef. The diff is that one commit and nothing else. git patch-id --stable is identical for both, and the cherry-pick applied without conflicts on top of #89 and #91.

Why before v0.4.3: release/0.4 now carries #88 (through #89), and with it the error-type regression r144 f1 found: WorkspaceValue/WorkspaceValueIfSet return a pinned value's broken delivery as a bare ErrFileCarrier, without ErrAuthorityValueChanged (r156 f1). This PR fixes that on the line, together with f2 (an empty delivered file is a broken delivery, not absence) and f3 (a name in both namespaces is refused). v0.4.3 must not be cut until this merges. The behaviour and the reasoning are in #90.

Test plan

On this branch at e079312:

  • go test -race -count=1 ./... (root) passes, including the tag audit (restored by release/0.4: backport #81, restoring the retractions v0.4.2 lost #91) and the agent-context budget.
  • cd workcontext && go test -race -count=1 ./... passes.
  • ./scripts/check-one-implementation.sh: ok (84 files). ./scripts/security-posture.sh: SP-WC-01, SP-WC-05 ok. golangci-lint run ./...: 0 issues.

Fix or hack

Fix: a reviewed change from main, backported without edits.

🤖 Generated with Claude Code

…ken (r144)

Three refusals under the maximum-security posture, from review r144:

- f1: WorkspaceValue and WorkspaceValueIfSet now report a pinned value whose
  live delivery breaks as ErrAuthorityValueChanged wrapping the reason, as
  Authority.Recheck already did. #88 returned the bare read failure, so a
  caller that stops or re-seals on that sentinel missed it.
- f2: a file carrier naming an empty file is refused with ErrFileCarrier
  ("delivered file is empty"), like a missing file. Codefly delivers by file
  only above resources.FileCarrierThreshold, so an empty file is a truncated
  write or a mount race. It used to read as absent, which let WorkspaceValue
  and ReadAuthority answer from the secret namespace (r144's "sec1" probe).
  The check sits in readFileCarrier, so every accessor and
  LoadEnvironmentVariables refuse it.
- f3: a name carried in both the public and the secret namespace is refused
  with the new ErrWorkspaceValueInBothNamespaces: two sources for one value,
  like inline plus file. It used to answer from the public one silently
  (r144's "pub" probe), so a stale public copy left behind after a move to
  the secret namespace kept answering. WorkspaceConfiguration and
  WorkspaceSecret, which each name one namespace, still answer.

Each test fails with its fix reverted. The README gains a Workspace values
section; AGENTS.md, the carrier skill and configuration-documents.md say an
empty delivered file is broken, not absent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit e5f8cef)
@antoinetoussaint-byte
antoinetoussaint-byte merged commit d394f8a into release/0.4 Oct 26, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant