Skip to content

feat(CC-261/CC-262-M1/CC-263): doc cleanup + isolation-level policy + portable SHA-1#162

Merged
screenleon merged 9 commits into
mainfrom
feat/cc261-cc262m1-cc263
May 26, 2026
Merged

feat(CC-261/CC-262-M1/CC-263): doc cleanup + isolation-level policy + portable SHA-1#162
screenleon merged 9 commits into
mainfrom
feat/cc261-cc262m1-cc263

Conversation

@screenleon
Copy link
Copy Markdown
Owner

Summary

  • CC-261: Remove v0.3.x runtime deferral language from docs (M5 close-out)
  • CC-262 M1: Add core/policy/isolation-level.yaml (4 isolation values) + adapters/claude/isolation-map.yaml (no-op mappings for claude-executor)
  • CC-263: Add _portable_sha1() helper to scripts/lib/portable.sh (tries sha1sum, falls back to shasum -a 1); consume it in scripts/lib/state-writer.sh _sw_project_key(); update state-store tests to use _portable_sha1

Gate status (latest: gate-20260525-175621)

NO-GO — 3 remaining issues being fixed in parallel:

  1. core/README.md:36 — explicit scripts/lib/state-writer.sh path violates core layer invariant (fix: generalize to "scripts/ layer")
  2. test-portable.sh:1199 + test-state-store.sh:501 — fake shasum shims delegate to sha1sum; not truly sha1sum-independent (fix: use openssl dgst -sha1)
  3. adapters/claude/isolation-map.yaml — missing parity test vs core/policy/isolation-level.yaml (fix: add case_isolation_level_adapter_parity to test-core-schemas.sh)

Test plan

  • bash scripts/test-portable.sh — all pass
  • bash scripts/test-state-store.sh — all pass
  • bash scripts/test-core-schemas.sh — all pass including new parity test
  • bash scripts/run-all-tests.sh — all suites pass

🤖 Generated with Claude Code

screenleon and others added 9 commits May 25, 2026 16:59
…shipped

core/README.md: drop the parenthetical deferral note; state-writer module is
now real and operative.
agents/project-pm.md: update runtime PR exemption wording to be version-agnostic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… no-op map + portable SHA-1

- core/policy/isolation-level.yaml: new enum none/read-only/workspace-write/sandboxed
- adapters/claude/isolation-map.yaml: no-op translation table for claude-executor
- scripts/lib/portable.sh: _portable_sha1() cross-platform helper with FAKE_SHA1_MISSING stub
- scripts/lib/state-writer.sh: _sw_project_key uses _portable_sha1 instead of raw sha1sum
- scripts/test-state-store.sh: case_project_key_no_sha1sum stub test (30 passed, 0 failed)
- BACKLOG: close CC-261, CC-263; update CC-262 M1 shipped note
- MILESTONES: CC-262 M1 ✅ (#162), CC-261 ✅ (#162)
- CHANGELOG: [Unreleased] entries for all three tickets

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add case_portable_sha1_shasum_fallback to test-portable.sh:
uses FAKE_SHA1SUM_MISSING=1 + fake shasum shim to exercise the
shasum -a 1 fallback branch independently of sha1sum availability.

Also fix portable.sh comment to document FAKE_SHA1SUM_MISSING.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… contract

test-portable.sh: assert exact digest (da39a3...) instead of regex; a broken
_portable_sha1 returning an arbitrary 40-hex string would now fail.

core/README.md: revert over-stated present-tense writer contract to accurately
reflect that definition-layer validation is deferred to a future milestone.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
case_portable_sha1_both_missing: forces FAKE_SHA1_MISSING=1, asserts
_portable_sha1 exits non-zero and emits the expected warning to stderr
when neither sha1sum nor shasum is available.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace fixed-digest fake shasum with a real sha1sum passthrough shim
(ignoring shasum's -a 1 flags). The test now asserts the correct SHA-1
of "test-input\n" (19877dd...), so a broken impl returning a constant or
wrong-branch hash will fail.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ack integration

scripts/test-state-store.sh:
- case_dispatch_correct_partition: replace sha1sum|cut with _portable_sha1
- case_dispatch_subdir_partition_key: split git-rev-parse + _portable_sha1
- Add case_project_key_shasum_fallback: FAKE_SHA1SUM_MISSING=1 + fake shasum shim,
  asserts _sw_project_key returns 40-hex (not global) via shasum fallback path

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ation parity test

- core/README.md: remove explicit scripts/lib/state-writer.sh path; generalize to
  "scripts/ layer" to satisfy core/* layer invariant
- test-portable.sh: replace sha1sum-backed fake shasum with openssl dgst -sha1 shim;
  sha1sum-independent on macOS/BSD
- test-state-store.sh: same openssl shim fix for case_project_key_shasum_fallback
- test-core-schemas.sh: add case_isolation_level_adapter_parity that validates
  adapters/claude/isolation-map.yaml keys == core/policy/isolation-level.yaml values

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Shell-based brief-validate + codex-post-verify pipeline to replace
codex-executor subagent 2.5x overhead (~40 tool calls x 8s = ~6 min).
Priority P2, active, next after PR #162 merges.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@screenleon screenleon marked this pull request as ready for review May 26, 2026 00:34
@screenleon screenleon merged commit e40092f into main May 26, 2026
22 checks passed
@screenleon screenleon deleted the feat/cc261-cc262m1-cc263 branch May 26, 2026 00:36
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