Skip to content

Commit 418dd8d

Browse files
author
Jeremy
committed
test(engine): bind analysis fixture to snapshot policy revision
1 parent 4887b7a commit 418dd8d

7 files changed

Lines changed: 189 additions & 47 deletions

File tree

‎docs/plans/mcp-observability/execution-ledger.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,26 @@ invalid GH_TOKEN (I2); no push/PR or fallback credential/connection attempted.
4545
Local scope is complete, publication externally blocked. Final evidence commit
4646
retains clean source/branch and sanitized reports for parent; bundle outside repo
4747
preserves exact committed ref. Parent owns subsequent publication/merge.
48+
49+
2026-10-14: Parent approved bounded I1 repair for PR #4 after prior service failures.
50+
Verified real checkout read/write/fsync, clean branch/head and remote PR head
51+
4887b7af; no workspace recovery or duplicate push needed. Revisited I1 disposition
52+
under explicit follow-up authority. Fixture now resolves POLICY from its immutable
53+
compiled snapshot, asserts existence and selects semantic_revision and its single
54+
successor before the existing counting mocks. Production validator, normative
55+
content and both count assertions are unchanged. Failing case, analysis module,
56+
full Engine suite and independent review are required before the next commit/push.
57+
58+
2026-10-15: Fixture repair qualified. Owner targeted case passed 1 test in 3.748 s;
59+
independent targeted case passed in 3.676 s. Refreshed the registered test input
60+
through public Engine verify_repository; staged the new review report membership
61+
and refreshed again before freezing inputs. The initial analysis/full attempts
62+
with stale generated input were interrupted and are not acceptance evidence.
63+
Final analysis module passed 23 tests in 113.275 s. One uninterrupted full serial
64+
Engine invocation passed all 636 tests in 2161.675 s under PYTHONPATH=.; the formerly
65+
failing case and all observer-v3 tests passed in that run. Independent review bound
66+
test_analysis.py SHA256 7f51e403f03f5c57be8b1ca5736a79bcf139c87dd9eb4703ce3f7e59f1ba3d01.
67+
No production, validator or normative edits; both call-count assertions unchanged.
68+
Final evidence retains the historical I1 failure and resolves prior I2 transport
69+
confusion. Reviewed bounded staged scope before committing for approved PR #4
70+
branch push; publication identity is the Git ref, merge remains parent-owned.
Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
# Findings
22

3-
## I1 — baseline proposal-analysis fixture (medium, deferred)
3+
## I1 — baseline proposal-analysis fixture (medium, resolved)
44

55
`test_analysis.AnalysisWorkflowTest.test_proposal_analysis_uses_one_projection_and_one_verified_base`
6-
hardcodes accepted semantic revision 1/proposed 2. Both the candidate and a clean
6+
originally hardcoded accepted semantic revision 1/proposed 2. Both the candidate and a clean
77
Git clone of baseline `188beda1fa477d21d576c233dd8c7f4c4c267d23` return
88
`AUTHORING.INVALID_SEMANTIC_REVISION` before the test reaches its projection-count
99
assertions. Independent one-test baseline run:1 test, 1 failure, 1.397 s; candidate:
10-
1 test, 1 failure, 1.606 s. This source test is unchanged by issue3.
11-
12-
Owner: existing analysis test/standards-content maintainers. Disposition: defer
13-
outside the recorder write set; do not edit normative standards or weaken the
14-
validator. Revisit when maintaining this fixture against accepted policy revision.
15-
Required evidence: bind the test to the actual immutable accepted policy revision,
16-
then verify its intended projection-count claim. Full suite results remain visible;
17-
this is not labeled a successful complete Engine run.
10+
1 test, 1 failure, 1.606 s. At initial handoff head 4887b7af this source test was unchanged by issue3.
11+
12+
Owner: analysis fixture maintainers. Parent explicitly authorized this bounded
13+
follow-up for PR #4. Disposition: resolved by deriving the accepted semantic
14+
revision and its successor from the same immutable snapshot used for the proposal,
15+
before the counting mocks. Policy existence, real proposal/analysis results and
16+
both count assertions remain required. Validator and normative content unchanged.
17+
The targeted case passed (3.748 s), all 23 analysis tests passed (113.275 s), and
18+
the full serial Engine suite passed all 636 tests (2161.675 s). Independent fixture
19+
review passed; see reports/fixture-review.md. Historical baseline failure evidence
20+
above remains retained rather than relabeled as a baseline pass.
1821

1922
## Resolved review findings
2023

@@ -26,11 +29,11 @@ content. See reports/independent-review.md for source-bound evidence.
2629
Actual model/client traces are outside this task: synthetic process evidence does
2730
not certify model intent or acquisition. No new model qualification is claimed.
2831

29-
## I2 — publication authentication (blocking, external)
32+
## I2 — publication authentication (resolved)
3033

31-
`gh auth status` reports an invalid configured `GH_TOKEN`. Owner: parent/operator
32-
of the authorized GitHub connection. User has approved push+PR; no renewed
33-
publication approval is needed. Disposition: preserve exact local commits and
34-
Git bundle; do not replace credentials or bypass access failure. Revisit when a
35-
working authorized Git transport is available, then push/open PR. No remote
36-
mutation was attempted through a fallback credential or connection.
34+
The GitHub CLI reported an invalid configured `GH_TOKEN`, initially treated as a
35+
publication blocker. A later explicitly authorized attempt through the existing
36+
Git remote succeeded without inspecting/copying tokens or changing authentication.
37+
Remote head 4887b7af was verified and the parent opened draft PR #4. The CLI failure
38+
did not establish failure of the separate Git transport. Existing bundle and
39+
checkout were preserved; subsequent publication uses the approved Git branch.

‎docs/plans/mcp-observability/plan.md‎

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Persistent MCP interaction observability (issue 3)
22

3-
Status: Blocked (publication authentication). Local acceptance: satisfied; I1 baseline fixture deferred. Publication acceptance: unavailable (I2). Operation: start. Owner: implementation agent;
3+
Status: Accepted (local fixture qualification). Acceptance: satisfied. Operation: verify. Owner: implementation agent;
44
publication and merge authority remain with the parent/operator. Baseline:
55
`188beda1fa477d21d576c233dd8c7f4c4c267d23` (interface 46).
66
Canonical plan: `docs/plans/mcp-observability/plan.md`.
@@ -119,13 +119,26 @@ D Accepted: cold stdio/process replacement, exceptions/interruption, real unavai
119119
locked/full SQLite, concurrent processes, migration/retention/privacy. Existing MCP,
120120
runtime identity, discovery and observer-v3 tests plus full Engine suite and
121121
contract projection check. Synthetic baseline/candidate call and byte comparison.
122-
E Blocked: independent GPT-6.1 Sol High design/source/privacy review accepted with all seven findings resolved; staged and full branch review, local commits, authorized push and PR.
122+
E Accepted: independent GPT-6.1 Sol High design/source/privacy review accepted with all seven findings resolved; staged and full branch review, local commits, authorized push and PR.
123123
No real logs or confidential artifacts in Git. Parent owns merge. The generated
124124
`evaluation/standards-effectiveness/generated/suite-inputs.json` is an allowed
125125
adjacent write: refresh through the Engine after staging declared inputs; it
126126
tracks source/README digests and is not a normative standards change.
127127

128-
Current phase: E (publication blocked). Next slice: parent restores working authorized GitHub access, then publishes the retained exact branch and opens the approved PR.
129-
Blockers: I2 invalid GitHub CLI token. D executed all 636 Engine cases: 635 pass after environment qualification,1 unchanged baseline fixture failure I1 explicitly deferred. No full-suite-green claim is made. Replan on privacy/schema ownership, protocol/domain
130-
outcome change, unsupported storage invariant or insufficient acceptance evidence.
131-
See [verification](reports/verification.md), [independent review](reports/independent-review.md), [ledger](execution-ledger.md) and [issues](issues.md).
128+
F Accepted: repair I1 using the actual policy semantic revision from the immutable
129+
snapshot, before entering the existing counting mocks. Write set:
130+
`tools/standards_engine/tests/test_analysis.py`, this plan/ledger/issues, a bounded
131+
fixture-review report and current verification evidence; generated verifier input
132+
manifest only if its compiler requires a refresh. Gate: failing case, analysis
133+
module and full Engine suite pass; independent review; reviewed commit/push to
134+
existing approved PR #4 branch. Validator, normative content and both count
135+
assertions remain unchanged. No telemetry activation or raw log publication.
136+
137+
Current phase: complete local qualification. Next slice: none. Blockers: none.
138+
F evidence: targeted case passed; analysis module 23/23; full serial Engine suite
139+
636/636; independent fixture review satisfied. I1 is resolved without changing
140+
validator, normative content or either count assertion; historical baseline failure
141+
remains in issues/evidence. I2 resolved through the existing Git transport; parent
142+
opened PR #4. The verified follow-up is packaged for the explicitly approved branch
143+
push; Git/PR refs own publication identity and parent owns hosted CI/merge.
144+
See [verification](reports/verification.md), [fixture review](reports/fixture-review.md), [independent source/privacy review](reports/independent-review.md), [ledger](execution-ledger.md) and [issues](issues.md).
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Independent fixture repair review
2+
3+
Date: 2026-10-14. Parent baseline:
4+
`4887b7aff0ba84acd257da081135b7849cc9c79f`.
5+
Disposition: **satisfied for this bounded fixture change**. No source, privacy or
6+
oracle-weakening findings. Overall acceptance remains with the owner's final
7+
frozen-source analysis/full Engine and generated-input verification gates.
8+
9+
## Exact scope
10+
11+
The only test behavior change is in
12+
`tools/standards_engine/tests/test_analysis.py:2191`, method
13+
`test_proposal_analysis_uses_one_projection_and_one_verified_base`:
14+
15+
- Resolve `POLICY` through the compiled corpus of the same `self.snapshot` used
16+
as the proposal's `base_snapshot` and source of its body.
17+
- Assert the policy exists, then use its semantic revision as the accepted
18+
revision and that revision plus one as the proposed revision.
19+
- Perform this setup before installing the two counting mocks.
20+
21+
The diff is seven added lines and one removed line. The actual analysis call,
22+
`PendingResult` assertion and both exact `call_count == 1` assertions are
23+
unchanged. No production validator, normative content, telemetry code or public
24+
contract changes. The coordinated generated `suite-inputs.json` refresh is an
25+
allowed fixture-repair artifact: it records the changed registered test input and
26+
review-file membership; it does not alter the validator or weaken its decision.
27+
28+
## Authority and oracle assessment
29+
30+
`StandardsEngine._compiled_snapshot` at `engine.py:2122` loads captured content for
31+
the explicit snapshot ID and compiles a `FrozenContentSource`; it does not select
32+
the current live policy implicitly. Snapshot `load_content` at
33+
`standards_snapshots/module.py:123` verifies captured content identity after its
34+
durable read. The fixture's `open_repository` call supplies no compiled cache, so
35+
the extra setup lookup does not introduce a warm-cache substitute for the observed
36+
analysis path.
37+
38+
The repair follows the existing nearby convention in
39+
`test_analysis.py:335–351`: obtain the policy's accepted semantic revision from the
40+
captured corpus and advance it explicitly. This is correct fixture authority,
41+
rather than a new expected-result oracle derived from the subject under test.
42+
The test's independent expected behavior remains one verified-base load and one
43+
proposal projection during the analysis operation. Real proposal construction
44+
and revision validation still run and `CreateProposalResult` remains required.
45+
46+
## Independent evidence and binding
47+
48+
Command, from `/workspace/Coding-Standards` on CPython 3.12.14:
49+
50+
```sh
51+
PYTHONPATH=. python -m unittest tools.standards_engine.tests.test_analysis.AnalysisWorkflowTest.test_proposal_analysis_uses_one_projection_and_one_verified_base
52+
```
53+
54+
Result: **one test passed in 3.676 seconds**. `git diff --check` passed.
55+
56+
Reviewed test-file SHA256:
57+
`7f51e403f03f5c57be8b1ca5736a79bcf139c87dd9eb4703ce3f7e59f1ba3d01`.
58+
59+
The prior accepted observer, MCP, observer-test and operating-guide hashes were
60+
rechecked unchanged. The reviewer wrote only this report and performed no
61+
publication or installation action. No model calls or private logs were used.
62+
63+
The owner's first broader runs were interrupted because the registered test input
64+
had changed before its generated verifier digest was refreshed; their partial
65+
results are not acceptance evidence. The owner is refreshing through the public
66+
Engine verification path and will rerun the analysis module and full serial
67+
Engine suite from frozen source. Those final results and generated-manifest
68+
freshness are outside this independently executed targeted check.

‎docs/plans/mcp-observability/reports/verification.md‎

Lines changed: 50 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,40 @@ The following evidence commit owns this report; use `git rev-parse HEAD` for the
88
final handoff OID. No normative standards, generated agent contracts, Tuldok,
99
observer-v3 code/artifacts or existing installation configuration changed.
1010

11-
## Result
11+
## Current fixture follow-up result (2026-10-15)
1212

13-
Local issue3 implementation and independent source/privacy review are satisfied.
14-
Publication is blocked by unavailable GitHub CLI authentication: `gh auth status`
15-
reports that the configured `GH_TOKEN` is invalid. User authorization for push/PR
16-
was received; this is an authentication blocker, not a request for permission.
17-
No push, PR, comment, deployment, telemetry enabling or credential workaround was
18-
performed. Parent retains publication/merge ownership through a working authorized
19-
connection. The exact committed branch is preserved in a separate Git bundle.
13+
The bounded PR #4 fixture repair is qualified: resolve the policy from the same
14+
immutable snapshot, assert it exists, use semantic_revision and its successor,
15+
and keep setup outside the counting mocks. The real result assertions, validator,
16+
normative content and both count assertions are unchanged. Only test behavior and
17+
its registered generated-input digest changed; production observer hashes remain
18+
those accepted by the original source/privacy review.
19+
20+
| Required follow-up check | Result |
21+
| --- | --- |
22+
| Formerly failing case | 1 test passed in 3.748 s |
23+
| Complete analysis module | 23 tests passed in 113.275 s |
24+
| Full serial Engine suite | 636 tests passed in 2161.675 s; one uninterrupted invocation with PYTHONPATH=. |
25+
| Independent fixture review | Satisfied; targeted case independently passed in 3.676 s; exact test-file SHA256 recorded |
26+
| Generated input verification | Public Engine refresh returned 73 suites / 121 checks passed before final frozen-source runs |
27+
28+
See [fixture review](fixture-review.md). The first broader attempts caught the
29+
stale registered test-input digest and were interrupted; no partial results count
30+
as acceptance. After the coordinated generated-input refresh, both requested
31+
broader commands were restarted from zero and passed as stated above.
32+
33+
The existing Git transport successfully published the original head 4887b7af
34+
without authentication changes; the parent opened draft PR #4. The invalid CLI
35+
token was specific to that CLI connection, not proof that Git transport failed.
36+
The verified fixture follow-up is packaged for the approved existing branch push;
37+
Git/PR refs own the actual publication identity. Parent owns hosted CI and merge.
38+
No existing installation was enabled and no actual interaction log is published.
39+
40+
## Original observability qualification (before fixture repair)
41+
42+
The evidence below preserves the initial baseline comparison and its historical
43+
I1 failure. That failure is now resolved by the qualified follow-up above; it has
44+
not been rewritten as a successful run of the old fixture.
2045

2146
## Evidence and limits
2247

@@ -46,12 +71,13 @@ invocation was green. The CI environment sets `PYTHONPATH=.`. An initial
4671
and candidate; re-running each with that documented setting passed (candidate
4772
45.363 s, baseline 43.920 s). Its corrected pass is included in 635.
4873

49-
The one remaining failure is
74+
The original remaining failure was
5075
`test_analysis.AnalysisWorkflowTest.test_proposal_analysis_uses_one_projection_and_one_verified_base`:
51-
`AUTHORING.INVALID_SEMANTIC_REVISION`. It fails identically in a clean Git clone of
76+
`AUTHORING.INVALID_SEMANTIC_REVISION`. It failed identically in a clean Git clone of
5277
the baseline, because the fixture hardcodes accepted revision 1/proposed 2. The
53-
recorder never participates in that test. See [I1](../issues.md). It is deferred
54-
to the owning fixture maintainers; the full Engine suite is not labeled green.
78+
recorder never participates in that test. See [I1](../issues.md). It was initially
79+
deferred, then repaired under explicit follow-up authority as recorded above. The
80+
initial qualification is not relabeled as a green full-suite run.
5581

5682
The recorder regressions cover opt-in omission, unchanged catalog/outcomes,
5783
actual validation feedback, malformed envelopes/JSON, arbitrary-output exclusion,
@@ -81,7 +107,8 @@ python3 -m tools.standards_contracts.standards_contracts.projection --check
81107
PYTHONPATH=.:tools/standards_verifier python3 tools/standards_verifier/verify.py --complete
82108
```
83109

84-
The broad command is expected to expose I1 on this accepted-content baseline.
110+
The broad command exposed I1 at original head 4887b7af; after the bounded fixture
111+
repair the current full serial suite passes all 636 tests.
85112
[Cold comparison](baseline-comparison.md) gives the workload and byte totals.
86113
[Independent review](independent-review.md) binds final production/test/docs hashes.
87114
[Operating contract](../../../../tools/standards_engine/MCP-OBSERVABILITY.md) owns
@@ -96,15 +123,17 @@ reverifies any material change. Retirement follows the parent's accepted merge,
96123
rejection or explicit retained-resource decision; this task grants no destructive
97124
cleanup authority. No other mounted repository was modified.
98125

99-
The handoff bundle is `/workspace/issue3-mcp-observability.bundle`, outside the
100-
repository and not staged. It requires the named baseline commit and preserves
101-
the exact feature ref/head. In an authorized checkout containing that baseline:
126+
The original `/workspace/issue3-mcp-observability.bundle` remains preserved at
127+
pre-fixture head 4887b7af. The qualified fixture follow-up is packaged separately
128+
as `/workspace/issue3-mcp-observability-fixture-repair.bundle`, outside the
129+
repository and not staged. It requires the named baseline and preserves its
130+
exact feature ref/head. In an authorized checkout containing that baseline:
102131

103132
```sh
104-
git bundle verify /workspace/issue3-mcp-observability.bundle
105-
git fetch /workspace/issue3-mcp-observability.bundle feat/issue3-mcp-observability:feat/issue3-mcp-observability
133+
git bundle verify /workspace/issue3-mcp-observability-fixture-repair.bundle
134+
git fetch /workspace/issue3-mcp-observability-fixture-repair.bundle feat/issue3-mcp-observability:feat/issue3-mcp-observability
106135
```
107136

108-
Parent may then review the exact branch, push it and open the approved issue3 PR
109-
through working authorized access. Merge and installation enablement remain
110-
separate decisions. No actual telemetry or qualification trace accompanies it.
137+
PR #4 already exists. Parent may inspect the exact qualified branch and its
138+
publication ref through working authorized access. Merge and installation
139+
enablement remain separate decisions. No actual telemetry or qualification trace accompanies it.

‎evaluation/standards-effectiveness/generated/suite-inputs.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7829,7 +7829,7 @@
78297829
]
78307830
},
78317831
{
7832-
"digest": "sha256:c463c48d95bcbc5b5bfd3690668198897a251c5000e59db71f2cbc5f983d71af",
7832+
"digest": "sha256:7f51e403f03f5c57be8b1ca5736a79bcf139c87dd9eb4703ce3f7e59f1ba3d01",
78337833
"path": "tools/standards_engine/tests/test_analysis.py",
78347834
"state": "present",
78357835
"uses": [
@@ -14070,7 +14070,7 @@
1407014070
"path": "evaluation/standards-effectiveness/suite-registry.toml"
1407114071
},
1407214072
"repository_index": {
14073-
"digest": "sha256:7e6fd4988235abb92e2dd8eea14954b57f9e2b247ef7fddfac5afef2073e65c4",
14073+
"digest": "sha256:32d5e126dd74c0349f8b402496260d9184db813209fc2e6de80ed4259f66bef9",
1407414074
"uses": [
1407514075
{
1407614076
"check": "python-package-contract",

0 commit comments

Comments
 (0)