Skip to content

fix: prevent landscape workers deleting shared scratch - #987

Merged
seathatflowsinourveins merged 3 commits into
mainfrom
codex/ns2604-landscape-scratch-ownership
Oct 11, 2026
Merged

seathatflowsinourveins merged 3 commits into
mainfrom
codex/ns2604-landscape-scratch-ownership

Conversation

@seathatflowsinourveins

@seathatflowsinourveins seathatflowsinourveins commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

Landscape judgment workers could wildcard-delete another worker's shared scratch files. This change gives landscape-sweep-worker a native read-only tool allowlist and assigns scratch preparation/cleanup to the existing coordinator and command-only wrappers. Public GitHub GET/index/search replaces shell research in that role.

Native Skill is also excluded: a measured 2.1.296 fixture showed dynamic skill context could delete a foreign file with Bash absent. Workers read and apply installed SKILL.md research instructions; future templates, routing text and prompt digest contracts follow that route. The SubagentStart and SessionStart token-lanes hooks supply no carrier to this role because its body already provides the applicable guidance. This prevents the default carrier from directing the restricted worker to ungranted tools.

  • Base commit: 9d4c00cd05d79b3fd5074df2e46bacab87ee67ff.
  • Current head: 92ae28b617371aa8fe16811969e75fb69be46397, one released second correction directly on 1c9a61fea6925910ebe49e25736efb630d201fb3. The first correction and its historical receipts remain retained.
  • Lane: lane:foundation.
  • Owned paths: both landscape worker role copies; landscape-sweep sweep.js, templates.json, README; native-boundary and harness tests; both token-lanes startup hooks, hook tests and SHA256SUMS; the token-session handbook; the dated decision and evidence-manifest registrations.

SOTA sources

Evidence-class table

Claim Evidence class Command / receipt
The inherited role admitted wildcard deletion of foreign scratch files local_integration Native regression failed before the original role fix; the decision retains the command and result
Retaining native Skill bypassed a tool list without Bash through dynamic shell context local_integration Native dynamic-Skill regression failed before Skill was excluded; the decision retains the result
The final role refuses destructive/exec calls while source reads and context fetch/index/search still dispatch local_integration The current boundary module has 12 tests and SubagentStart has 23 (35 combined), covered by the passing 241-test current-head selection; historical 34-test head/merge receipts remain separately retained; provider responses are synthetic
The hook supplies zero carrier bytes for the worker and names only granted tools for every shipped restricted role local_integration Full 23-test token-lanes module passes; the original head reproduced two failures, and the expanded silent-role regression reproduced three before the hook fix
Future sweep prompts use source-reading skills and retain command-only wrapper routing synthetic Existing landscape-sweep harness fixtures and intentional prompt digest updates from the original implementation
Changed publication hashes and scope are consistent local_integration Evidence-manifest ordering and FULL validate pass at the final head and merged snapshot
Tool-list semantics, optional hook context and selected read MCP surfaces follow the cited sources source_review Installed 2.1.296, official documentation and pinned context-mode source

Local commands run

python3 -m unittest tests.test_token_lanes_subagent_start
before correction at 4a1e5b7d: exit 1; 23 tests, 2 failures
with updated silent-role expectations before hook fix: exit 1; 23 tests, 3 failures

python3 -m unittest tests.test_token_lanes_subagent_start tests.test_landscape_sweep_worker_boundary
historical first-correction head 1c9a61fe: exit 0; 34 tests, 19.932 s; no skips
historical first-correction merged snapshot: exit 0; 34 tests, 19.966 s; no skips

python3 scripts/evidence_manifest.py --check
exit 0; 11423 registered files sorted

python3 scripts/validate.py
final head: exit 0; 70 components, 11423 hashed files, 4 profiles, 239 receipts
merged snapshot: exit 0; 70 components, 11472 hashed files, 4 profiles, 239 receipts

gitleaks git . --redact=100 --no-banner --no-color --log-opts=9d4c00cd05d79b3fd5074df2e46bacab87ee67ff..HEAD
exit 0; PR range only, 2 commits scanned, no leaks found

git diff --cached --check
exit 0

Merged checks used tree 2e3d01452186cdc17476056431e11f80b07bb52b, produced by git merge-tree --write-tree 8bffa2c41692ef483e91b68e3b15aeb331423d2c 1c9a61fea6925910ebe49e25736efb630d201fb3 and checked out in an owned detached test worktree. No rebase or landing was performed. FULL validate checks integrity and scope; the native boundary suite uses isolated loopback fixtures with no paid model or real authentication. Full unittest discovery remains with hosted CI under the CC's test policy.

Decision record

docs/decisions/2026-10-10-landscape-scratch-ownership.md records vendor sources, failing regressions, the hook correction, alternatives and the overturn condition.

The boundary controls tools available to judgment workers. Coordinator/native job wrappers retain their capabilities. Research quality and throughput with public GitHub retrieval and source-reading skills remain unbenchmarked; inaccessible facts stay unknown/pending.

Checklist

  • No Actions workflow added or changed.
  • Changed bytes and hook SHA256SUMS registered; FULL validate passes.
  • No credential read, printed, copied or committed; no new required secret.
  • No paid service or billing surface introduced.
  • Peer files, frozen exports, active installed roles and existing worktrees preserved.

Follow-ups

  • Research the skills-modality null-digest chain: coordinator-derived pinned skill digest versus non-null merge selection; the CC holds all skills-modality launches until a qualified path exists (research intake: skills-lifecycle, fix: prevent landscape workers deleting shared scratch #987 thread4240880947).
  • Research unauthenticated GitHub capacity: 60 requests/hour per originating IP and the facts-template refuted=true versus role-body unknown conflict; compare coordinator prefetch or an authenticated read-only route (research intake: research-runtime, fix: prevent landscape workers deleting shared scratch #987 thread4240880950).
  • Add a bounded documentation/role consistency regression for the accurate stack-researcher comparison.
  • Add a Workflow-path carrier-silence regression. The current Workflow test passes even with the role removed from both silent sets.
  • In workflow mode, --agents shadows the user-scope role copy. Drop it on the next touch.
  • Wording: missing spaces at record :88 and :112 and at body :79 and :85. Also give the receipts location at record :89; body spacing is corrected in this metadata update, while record changes wait for its next touch.

Second correction — complete three-family wave

The CC’s 15:47Z release combines the sole in-scope SessionStart P2 with folded Workflow-path, hook-prerequisite and handbook corrections in ONE forward commit. SessionStart/SubagentStart share the worker silence boundary; both existing failing assertions are preserved. Hook checksums and all affected evidence registrations are refreshed. The pinned mirror anthropics/claude-code@2301018b1f61073c501a8e7a4813ef48c239163b CHANGELOG.md:7476 supplies SessionStart agent_type; :6738 supplies the general hook agent_type field and :5513 supplies print-mode tool-frontmatter behavior. Actual fail-first: SessionStart: 14 tests, two failures at 1c9a61f, green after the correction.

Native Workflow agent(prompt,{agentType}) now has local loopback coverage for refused Bash/MCP execution, preserved foreign scratch and admitted Read. The installed role is copied verbatim into an isolated test config. This is synthetic-provider local integration, not paid research or a live-provider result. Opted-in hosts explicitly refresh both held-out carriers; handbook lists both carriers’ zero-byte worker output. Skills digest and capacity mechanism choices remain research-queue items, with the skills launch hold preserved.

python3 -B -m unittest tests.test_token_lanes_session_start tests.test_token_lanes_subagent_start tests.test_install_claude_profile tests.test_evidence_manifest tests.test_landscape_sweep_worker_boundary tests.test_adoption_docs_consistency tests.test_practice_references
rc 0; 241 tests, 2 optional skips at the corrected source
sha256sum --strict --quiet --check SHA256SUMS
python3 scripts/validate.py
python3 scripts/evidence_manifest.py --check
git diff --check

After this second fix round, ONE delta micro per family. The CC adjudicates any remaining items; a reproduced defect in the fix commit gets one correction, other findings are Follow-ups unless a new P1.

Current review disposition

Claude delta micro is PASS_WITH_P3 at 92ae28b; no correction is owed. Its carrier-silence and CLI-role-shadowing findings are retained above for the next touch, with record spacing and receipt-location wording. Current source-window/binary-hash receipts are retained privately in lanes/convergence-practice-work/pr987-release-fix-20261011/, including claude-2.1.296-SessionStart-source.json and the full pinned changelog. This body edit changes no source or head. Hold for the queued GPT delta ACK over 1c9a61f..92ae28b and the CC landing cue; skills-modality launch and research Follow-up gates remain.

@seathatflowsinourveins seathatflowsinourveins added the lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers label Oct 10, 2026
@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T16:20:26.943761Z 92ae28b Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1c9a61fea6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@seathatflowsinourveins

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 92ae28b617

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@seathatflowsinourveins
seathatflowsinourveins merged commit 99e72ae into main Oct 11, 2026
35 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the codex/ns2604-landscape-scratch-ownership branch October 11, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant