cto/.sot/03-PROTOCOLS/CTO-CASE-STAGE3-COPIED-REPO-ISSUES.md
2026-05-31 23:20:24 -04:00

4.5 KiB

name tier status owner source created last_reviewed lifecycle_classification core_promotion_status description
cto-case-stage3-copied-repo-issues local draft jp .sot/03-PROTOCOLS/CTO-CASE-STAGE3-COPIED-REPO-PRD.md 2026-06-01 2026-06-01 planning not-promoted Child-local issue sequence for Stage 3 Case copied-repo fixture proof.

CTO Case Stage 3 Copied Repo Issues

Local planning SOT only. Not a Core Protocol. Not active Core authority.

Issue Sequence

CTO-WORK-033 - Stage 3 Copied Repo PRD

Type: AFK

Status: validated.

Blocked by: CTO-WORK-012

User stories covered: CTO Case Candidate Backend PRD stories 4, 5, 7, 8, 9, 10, 11, 13.

What to build: Define the Stage 3 copied-repo fixture proof before implementation starts.

Acceptance criteria:

  • PRD states Stage 3 allowed mutation scope is copied local repository fixture only.
  • PRD requires Stage 2 validation before Stage 3.
  • PRD requires CTO_HARNESS_ALLOW_CASE=1 and CTO_HARNESS_CASE_STAGE=3.
  • PRD requires source repository ownership and local source classification.
  • PRD requires source repository HEAD and status before and after Case execution.
  • PRD requires copied fixture clean start and clean end proof.
  • PRD forbids Target Repository, source repository, Case source, vendor source, Hermes WebUI, and Cortex Core mutation.
  • PRD requires full Harness Evidence Interface artifacts.
  • PRD requires dirty-starting-tree, dirty-ending-tree, timeout, artifact-write-failure, disallowed-file, failed-tests, and missing-required-event failure fixtures.
  • Local CTO validator checks Stage 3 PRD and issue artifact.

Allowed files: CTO child workspace planning docs and local validator only.

Validator: python3 tools/validate_cto_child.py

Done evidence: PRD, issue artifact, validator JSON, clean worktree, commit.

CTO-WORK-034 - Stage 3 Harness Copied Repo Fixture Route

Type: AFK

Status: validated.

Blocked by: CTO-WORK-033

User stories covered: CTO Case Candidate Backend PRD stories 4, 5, 7, 8, 9, 10, 11, 13.

What to build: In /home/svrnty/workspaces/hermes/cto/harness, implement the Stage 3 copied-repo fixture route behind the existing case engine seam.

Acceptance criteria:

  • case remains disabled by default.
  • CTO_HARNESS_ALLOW_CASE=1 remains required.
  • CTO_HARNESS_CASE_STAGE=3 is required before copied-repo Case execution.
  • Missing Stage 3 gate emits blocked evidence and does not run Case.
  • Source repository is copied before Case starts.
  • Source repository HEAD and status before/after proof match.
  • Case mutates only the copied fixture.
  • Copied fixture starts clean and ends clean after harness post-processing.
  • No Target Repository path is inspected or copied.
  • Required artifacts include source non-mutation proof, clean-start proof, clean-end proof, report.json, report.md, events.normalized.jsonl, trace.jsonl, patch.diff, test.log, and backend logs.
  • Failure fixtures fail closed for dirty source start, dirty copied fixture start, dirty copied fixture end, timeout, artifact write failure, disallowed file, failed tests, and missing required event.
  • Fake remains the default validation lane and broad health remains green after focused Stage 3 validation.

Allowed files: Hermes CTO harness engine, copied-repo fixtures, focused Stage 3 validator, harness docs, and tests. WebUI, Core, Case source, vendor source, source repository, Target Repository, and external developer repositories are forbidden.

Validator: python3 harness/runner/validate-case-stage3.py --harness-root harness --json, then harness/evals/health.sh --json.

Done evidence:

  • Hermes commit: 4edf5f1 Add Case Stage 3 copied repo harness proof.
  • Stage 3 pass report: /home/svrnty/.hermes/profiles/cto-planb/harness-runs/20260601T031903Z-r1-string-slugify-3018046/report.json.
  • Stage 3 source proof: /home/svrnty/.hermes/profiles/cto-planb/harness-runs/20260601T031903Z-r1-string-slugify-3018046/stage3-copied-repo-proof.json.
  • Final post-merge focused validator: python3 harness/runner/validate-case-stage3.py --harness-root harness --json.
  • Final post-merge aggregate validator: harness/evals/health.sh --json.
  • Hermes main worktree clean after fast-forward merge.

Granularity Check

This is intentionally two slices: one planning route and one executable harness route. It is not over-granular because Stage 3 introduces source repository copy and non-mutation proof, which are distinct from Stage 2 artificial fixture proof.