Skip to content

Commit 3888e10

Browse files
committed
Record decision trace eval ownership boundary
1 parent 43ad685 commit 3888e10

8 files changed

Lines changed: 206 additions & 2 deletions

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@ For a guided walkthrough of the canonical demo flow, see [docs/demo/fog-harbor-w
428428
- Post-Phase-67 outcome/report/eval generalization audit keeps the queue paused; `docs/plans/post-phase-67-outcome-report-eval-generalization-audit-2026-06-08.md` records that selected-world proof is current for `fog-harbor-east-gate`, `museum-night`, and `library-rain`, does not claim future-world readiness, and does not prove a Phase 68 blocker. Do not open Phase 68 from this audit.
429429
- Post-Phase-67 runtime-created world eval proof keeps the queue paused; `docs/plans/post-phase-67-runtime-created-world-eval-proof-2026-06-08.md` records that a runtime-created bounded world can pass `eval-world`, does not claim future-world readiness, and does not prove a Phase 68 blocker. Do not open Phase 68 from this proof.
430430
- Post-Phase-67 decision-trace replay audit keeps the queue paused; `docs/plans/post-phase-67-decision-trace-replay-audit-2026-06-08.md` records current evidence for kernel-level replay and runner-level same-run-directory replay. Do not open Phase 68 from this audit.
431+
- Post-Phase-67 decision-trace eval-ownership boundary keeps the queue paused; `docs/plans/post-phase-67-decision-trace-eval-ownership-boundary-2026-06-08.md` records that eval-owned decision-trace replay metrics remain unclaimed and that opening implementation without a source-backed blocker would be blueprint drift. Do not open Phase 68 from this boundary note.
431432
- Phase 48 is closed after PR `#382`, issue `#375`, and milestone `Phase 48 - Successor Intake and Boundary Contract Triage`.
432433
- Phase 49 is closed after PR `#395`, issue `#383`, and milestone `Phase 49 - Kernel, Perturbation, and Runtime Contract Hardening`; completed work items were `#384`, `#386`, `#388`, `#390`, `#392`, and `#394`.
433434
- Phase 50 is closed after PR `#402`, issue `#396`, and milestone `Phase 50 - Runtime Orchestration Measurement and Product Boundary`; completed work items were `#397`, `#398`, and `#401`. Phase 50 measured before any `task_id` or worker contract is introduced and kept the private-beta launch hub planning-only for now.
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
from __future__ import annotations
2+
3+
from pathlib import Path
4+
5+
6+
BOUNDARY_PATH = Path("docs/plans/post-phase-67-decision-trace-eval-ownership-boundary-2026-06-08.md")
7+
REPLAY_AUDIT_PATH = Path("docs/plans/post-phase-67-decision-trace-replay-audit-2026-06-08.md")
8+
MINIMUM_LOOP = (
9+
"corpus -> chunks -> graph -> personas -> scenarios -> deterministic runs -> "
10+
"report/claims -> eval"
11+
)
12+
13+
14+
def _read(path: Path) -> str:
15+
assert path.exists(), path
16+
return path.read_text(encoding="utf-8")
17+
18+
19+
def test_decision_trace_eval_ownership_boundary_exists_with_required_sections() -> None:
20+
boundary = _read(BOUNDARY_PATH)
21+
required_sections = [
22+
"# Post-Phase-67 Decision Trace Eval Ownership Boundary",
23+
"## Scope",
24+
"## Current-Code Finding",
25+
"## Source Evidence",
26+
"## Blueprint Alignment Decision",
27+
"## Future Trigger Conditions",
28+
"## Boundaries",
29+
"## Validation Commands",
30+
]
31+
for section in required_sections:
32+
assert section in boundary
33+
34+
35+
def test_eval_ownership_boundary_keeps_metrics_unclaimed_without_phase68() -> None:
36+
boundary = _read(BOUNDARY_PATH)
37+
replay_audit = _read(REPLAY_AUDIT_PATH)
38+
contracts = _read(Path("docs/architecture/contracts.md"))
39+
eval_service = _read(Path("backend/app/evals/service.py"))
40+
decision_kernel = _read(Path("backend/app/decision_kernel/service.py"))
41+
pipeline_tests = _read(Path("backend/tests/test_pipeline.py"))
42+
43+
required_boundary_phrases = [
44+
f"`{MINIMUM_LOOP}`",
45+
"Current-code audit result: eval-owned decision-trace replay metrics remain unclaimed today.",
46+
"This is not a source-backed Phase 68 blocker.",
47+
"Opening an implementation queue for eval-owned decision-trace replay metrics without a new source-backed blocker would be blueprint drift.",
48+
"Do not open Phase 68 from this boundary note.",
49+
"The current queue remains in the formal paused stop-state.",
50+
"`backend/app/evals/service.py` currently has no `decision_trace`, `replay_cache`, or `accepted_from_replay` ownership.",
51+
"`docs/architecture/contracts.md` does not require transfer eval summaries to include decision-trace replay metrics.",
52+
"kernel-level replay and runner-level same-run-directory replay remain the current proven boundary",
53+
"No ADR or `docs/architecture/contracts.md` update is made by this boundary note because this diff does not change a protected-core contract.",
54+
"`status:needs-adr` and unresolved `risk:safety` findings remain merge blockers.",
55+
"Do not present Mirror as a real-world prediction machine.",
56+
"Do not build real-person personas or digital doubles.",
57+
"Do not build political persuasion, hidden surveillance, law-enforcement scoring, hiring, credit, medical, or judicial decision systems.",
58+
]
59+
forbidden_boundary_phrases = [
60+
"Phase 68 is active",
61+
"Phase 68 execution queue is open",
62+
"open a Phase 68 milestone now",
63+
"eval-owned decision-trace replay metrics are implemented",
64+
"changes decision_trace.jsonl shape",
65+
"claims provider-backed replay readiness",
66+
"claims future-world readiness",
67+
]
68+
for phrase in required_boundary_phrases:
69+
assert phrase in boundary, phrase
70+
for phrase in forbidden_boundary_phrases:
71+
assert phrase not in boundary, phrase
72+
73+
assert "Future eval ownership for decision-trace replay metrics remains unclaimed by this audit." not in replay_audit
74+
assert "`docs/plans/post-phase-67-decision-trace-eval-ownership-boundary-2026-06-08.md`" in replay_audit
75+
76+
for phrase in [
77+
"`decision_trace.jsonl` is the durable v1 decision audit artifact",
78+
"`replay_cache` when the selection is copied from an existing trace entry for the same",
79+
"`accepted_from_replay` for replay-cache reuse.",
80+
]:
81+
assert phrase in contracts
82+
83+
for phrase in ["decision_trace", "replay_cache", "accepted_from_replay"]:
84+
assert phrase not in eval_service
85+
86+
for phrase in [
87+
"replay_entry = self.replay_cache.get(input_hash)",
88+
'provider_mode="replay_cache"',
89+
'validation_status="accepted_from_replay"',
90+
]:
91+
assert phrase in decision_kernel
92+
assert phrase in boundary
93+
94+
assert "test_simulation_replays_from_existing_decision_trace" in pipeline_tests
95+
assert "test_simulation_replays_from_existing_decision_trace" in boundary
96+
97+
98+
def test_current_docs_point_to_eval_ownership_boundary_without_opening_phase68() -> None:
99+
docs = [
100+
Path("README.md"),
101+
Path("docs/plans/current-state-baseline.md"),
102+
Path("docs/plans/phase-execution-queue.md"),
103+
Path("docs/plans/automation-roadmap.md"),
104+
]
105+
required_phrases = [
106+
"`docs/plans/post-phase-67-decision-trace-eval-ownership-boundary-2026-06-08.md`",
107+
"Post-Phase-67 decision-trace eval-ownership boundary keeps the queue paused",
108+
"eval-owned decision-trace replay metrics remain unclaimed",
109+
"Do not open Phase 68 from this boundary note.",
110+
]
111+
forbidden_phrases = [
112+
"Phase 68 is active",
113+
"Phase 68 execution queue is open",
114+
"`audit-github-queue` reports `ready` for Phase 68",
115+
"milestone `Phase 68",
116+
]
117+
for path in docs:
118+
text = _read(path)
119+
for phrase in required_phrases:
120+
assert phrase in text, f"{path} is missing eval-ownership boundary pointer: {phrase}"
121+
for phrase in forbidden_phrases:
122+
assert phrase not in text, f"{path} opens Phase 68 prematurely: {phrase}"

backend/tests/test_post_phase67_decision_trace_replay_audit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_decision_trace_replay_audit_is_source_backed_without_phase68() -> None:
4545
"The current queue remains in the formal paused stop-state.",
4646
"does not change `decision_trace.jsonl` shape",
4747
"No ADR or `docs/architecture/contracts.md` update is made by this audit because this diff does not change a protected-core contract.",
48-
"TODO[verify]: Future eval ownership for decision-trace replay metrics remains unclaimed by this audit.",
48+
"`docs/plans/post-phase-67-decision-trace-eval-ownership-boundary-2026-06-08.md` records that future eval ownership for decision-trace replay metrics remains unclaimed and is not a current Phase 68 blocker.",
4949
"`status:needs-adr` and unresolved `risk:safety` findings remain merge blockers.",
5050
"Do not present Mirror as a real-world prediction machine.",
5151
"Do not build real-person personas or digital doubles.",

docs/plans/automation-roadmap.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Day 0 bootstrap is complete, Phase 5 closeout is complete, Phase 6 closeout is c
3131
- Post-Phase-67 outcome/report/eval generalization audit keeps the queue paused; `docs/plans/post-phase-67-outcome-report-eval-generalization-audit-2026-06-08.md` records that selected-world proof is current for `fog-harbor-east-gate`, `museum-night`, and `library-rain`, does not claim future-world readiness, and does not prove a Phase 68 blocker. Do not open Phase 68 from this audit.
3232
- Post-Phase-67 runtime-created world eval proof keeps the queue paused; `docs/plans/post-phase-67-runtime-created-world-eval-proof-2026-06-08.md` records that a runtime-created bounded world can pass `eval-world`, does not claim future-world readiness, and does not prove a Phase 68 blocker. Do not open Phase 68 from this proof.
3333
- Post-Phase-67 decision-trace replay audit keeps the queue paused; `docs/plans/post-phase-67-decision-trace-replay-audit-2026-06-08.md` records current evidence for kernel-level replay and runner-level same-run-directory replay. Do not open Phase 68 from this audit.
34+
- Post-Phase-67 decision-trace eval-ownership boundary keeps the queue paused; `docs/plans/post-phase-67-decision-trace-eval-ownership-boundary-2026-06-08.md` records that eval-owned decision-trace replay metrics remain unclaimed and that opening implementation without a source-backed blocker would be blueprint drift. Do not open Phase 68 from this boundary note.
3435
- Phase 1 and Phase 2 gates are closed.
3536
- Phase 3 is closed locally and in GitHub.
3637
- Phase 3 exit issue `#4` is closed and milestone `Phase 3 - Eval/UI/Demo` is closed.

docs/plans/current-state-baseline.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Post-Phase-67 runtime-created world eval proof keeps the queue paused; `docs/pla
3232

3333
Post-Phase-67 decision-trace replay audit keeps the queue paused; `docs/plans/post-phase-67-decision-trace-replay-audit-2026-06-08.md` records current evidence for kernel-level replay and runner-level same-run-directory replay. Do not open Phase 68 from this audit.
3434

35+
Post-Phase-67 decision-trace eval-ownership boundary keeps the queue paused; `docs/plans/post-phase-67-decision-trace-eval-ownership-boundary-2026-06-08.md` records that eval-owned decision-trace replay metrics remain unclaimed and that opening implementation without a source-backed blocker would be blueprint drift. Do not open Phase 68 from this boundary note.
36+
3537
## Snapshot
3638

3739
- Local quality baseline:

docs/plans/phase-execution-queue.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ Phase 67 - Blueprint Calibration and Minimum-Loop Value Gate
120120
- Post-Phase-67 outcome/report/eval generalization audit keeps the queue paused; `docs/plans/post-phase-67-outcome-report-eval-generalization-audit-2026-06-08.md` records that selected-world proof is current for `fog-harbor-east-gate`, `museum-night`, and `library-rain`, does not claim future-world readiness, and does not prove a Phase 68 blocker. Do not open Phase 68 from this audit.
121121
- Post-Phase-67 runtime-created world eval proof keeps the queue paused; `docs/plans/post-phase-67-runtime-created-world-eval-proof-2026-06-08.md` records that a runtime-created bounded world can pass `eval-world`, does not claim future-world readiness, and does not prove a Phase 68 blocker. Do not open Phase 68 from this proof.
122122
- Post-Phase-67 decision-trace replay audit keeps the queue paused; `docs/plans/post-phase-67-decision-trace-replay-audit-2026-06-08.md` records current evidence for kernel-level replay and runner-level same-run-directory replay. Do not open Phase 68 from this audit.
123+
- Post-Phase-67 decision-trace eval-ownership boundary keeps the queue paused; `docs/plans/post-phase-67-decision-trace-eval-ownership-boundary-2026-06-08.md` records that eval-owned decision-trace replay metrics remain unclaimed and that opening implementation without a source-backed blocker would be blueprint drift. Do not open Phase 68 from this boundary note.
123124
- If a future minimum-loop audit finds a contract gap, split a separate protected-core contract issue before changing schema, scenario DSL, claim labels, run trace shape, or artifact layout.
124125

125126
## Phase 66 Closed Queue
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Post-Phase-67 Decision Trace Eval Ownership Boundary
2+
3+
Date: 2026-06-08
4+
5+
## Scope
6+
7+
This boundary note closes the eval-ownership follow-up left by the Post-Phase-67 decision-trace replay audit.
8+
9+
It asks only whether future eval ownership for decision-trace replay metrics is a current source-backed blocker. It does not implement new eval metrics.
10+
11+
The minimum loop remains:
12+
13+
```text
14+
corpus -> chunks -> graph -> personas -> scenarios -> deterministic runs -> report/claims -> eval
15+
```
16+
17+
The queue shorthand is `corpus -> chunks -> graph -> personas -> scenarios -> deterministic runs -> report/claims -> eval`.
18+
19+
## Current-Code Finding
20+
21+
Current-code audit result: eval-owned decision-trace replay metrics remain unclaimed today.
22+
23+
This is not a source-backed Phase 68 blocker.
24+
25+
The current queue remains in the formal paused stop-state.
26+
27+
`backend/app/evals/service.py` currently has no `decision_trace`, `replay_cache`, or `accepted_from_replay` ownership.
28+
29+
`docs/architecture/contracts.md` does not require transfer eval summaries to include decision-trace replay metrics.
30+
31+
## Source Evidence
32+
33+
- `docs/architecture/contracts.md` states that `decision_trace.jsonl` is the durable v1 decision audit artifact.
34+
- `docs/architecture/contracts.md` defines `replay_cache` when the selection is copied from an existing trace entry for the same `input_hash`.
35+
- `docs/architecture/contracts.md` defines `accepted_from_replay` for replay-cache reuse.
36+
- `backend/app/decision_kernel/service.py` looks up `replay_entry = self.replay_cache.get(input_hash)`.
37+
- `backend/app/decision_kernel/service.py` finalizes cache hits with `provider_mode="replay_cache"` and `validation_status="accepted_from_replay"`.
38+
- `backend/tests/test_pipeline.py` includes `test_simulation_replays_from_existing_decision_trace`.
39+
40+
## Blueprint Alignment Decision
41+
42+
Do not open Phase 68 from this boundary note.
43+
44+
Opening an implementation queue for eval-owned decision-trace replay metrics without a new source-backed blocker would be blueprint drift.
45+
46+
The correct current boundary is narrower: kernel-level replay and runner-level same-run-directory replay remain the current proven boundary, while eval-owned decision-trace replay metrics remain future contract work only if a later audit proves a minimum-loop gap.
47+
48+
No successor queue is opened by this boundary note.
49+
50+
## Future Trigger Conditions
51+
52+
Before eval-owned decision-trace replay metrics can become implementation work, a future reviewed audit must identify:
53+
54+
- the exact metric eval would own, such as trace existence, replay consistency, cache-hit rate, provider-call avoidance, privacy redaction, or runtime-node coverage
55+
- the eval command and artifact scope, such as `eval-world`, `eval-transfer`, generated runtime sessions, or private-beta-only validation
56+
- the source-backed minimum-loop gap or protected-core contract blocker that makes the metric necessary now
57+
- whether `eval/summary.json` becomes a stable metric contract and therefore needs `docs/architecture/contracts.md` and possibly an ADR
58+
59+
## Boundaries
60+
61+
- This boundary note does not change `decision_trace.jsonl` shape.
62+
- This boundary note does not change schema, scenario DSL, perturbation payload schema, decision schema, claim labels, report claim `evidence_ids`, run trace shape, compare artifact shape, session/node manifest shape, public demo artifact layout, plugin MCP contract, route ownership, or artifact layout.
63+
- This boundary note does not assert provider-backed replay readiness.
64+
- This boundary note does not assert future-world readiness.
65+
- No ADR or `docs/architecture/contracts.md` update is made by this boundary note because this diff does not change a protected-core contract.
66+
- `status:needs-adr` and unresolved `risk:safety` findings remain merge blockers.
67+
- Do not present Mirror as a real-world prediction machine.
68+
- Do not build real-person personas or digital doubles.
69+
- Do not build political persuasion, hidden surveillance, law-enforcement scoring, hiring, credit, medical, or judicial decision systems.
70+
71+
## Validation Commands
72+
73+
- `python -m pytest backend/tests/test_post_phase67_decision_trace_eval_ownership_boundary.py -q`
74+
- `python -m pytest backend/tests/test_post_phase67_decision_trace_replay_audit.py backend/tests/test_post_phase67_decision_trace_eval_ownership_boundary.py -q`
75+
- `python scripts/check_no_secrets.py`
76+
- `python -m backend.app.cli audit-github-queue --repo YSCJRH/mirror-sim`
77+
- `git diff --check`

docs/plans/post-phase-67-decision-trace-replay-audit-2026-06-08.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ This audit does not prove a protected-core blocker. It proves that the current d
4747

4848
No successor queue is opened by this audit.
4949

50-
TODO[verify]: Future eval ownership for decision-trace replay metrics remains unclaimed by this audit.
50+
Follow-up boundary: `docs/plans/post-phase-67-decision-trace-eval-ownership-boundary-2026-06-08.md` records that future eval ownership for decision-trace replay metrics remains unclaimed and is not a current Phase 68 blocker.
5151

5252
## Boundaries
5353

0 commit comments

Comments
 (0)