Repository navigation
Record structured, correlatable cycle outcomes (#37) - #44
Conversation
What a run went on to produce is now recorded on rows of its own, never on the dispatch rows that hold the pre-routing signals: - verdict rows: status, findings by severity and a reported boolean tests.passed; - the closing cycle row: first-pass approval, whether resolution was needed and its rounds, first and final review verdicts, final approval, the latest test result, fallback stages and contract violations. Every row of one run carries a cycle_id minted per CycleRecorder and validated before anything is dispatched; stage_seq ties a verdict to the dispatch it reports on, and record_kind names dispatch, verdict or cycle. Telemetry.cycle_outcome reassembles a run and reports an unclosed one as unknown. Review outcomes appear only after a review reached APPROVED or CHANGES_REQUESTED, so an absent outcome never reads as approved, passing or zero. Every value goes through FIELD_SPECS. Telemetry schema moves to version 3 additively in payload; version-1 and version-2 rows stay readable and belong to no reassembled cycle. Closes #37
Review: CHANGES_REQUESTEDReviewed the accumulated diff from Findings[REV-001] · medium · open · blocks:yes — Documented check outcomes are never recordedPath: The verdict path passes only Security triageThis change touches observability and persisted telemetry, so the security audit was run. No confirmed vulnerability was found in the changed surfaces. The review covered the typed field allowlist, identifier validation, and separation of structured values from free text. The audit did not exercise external agent providers or a deployed telemetry database. Verification
CIAll current GitHub checks passed: Residual risksThe suite exercises simulated cycle adapters rather than external agent providers or a deployed telemetry database. The advertised check-count gap remains open and prevents approval. VerdictRequest changes. Resolve REV-001 before approval. |
No skill's structured result reports check counts, so listing checks_passed and checks_failed as verdict outcomes described data nothing writes. They leave OUTCOME_FIELDS and the documented contract, and stay accepted telemetry fields. A regression test pins the documented verdict outcomes to exactly what run_cycle reads off a structured result.
Resolution: RESOLVEDResolved the review at Findings[REV-001] · medium · resolved · blocks:yes — Documented check outcomes are never recordedPath: Decision: valid. Fixed by the second option the review offered, which removes the fields from the documented contract. No skill's
Commit: Post-change workflow
Verification
CI
Residual risksCheck counts are not recorded as a cycle outcome until a skill defines them in its structured result. CI state stays in the published review comment. |
Re-review: APPROVEDRe-reviewed the accumulated diff for PR #44 against Since the previous review, commit Previous findings[REV-001] · medium · resolved · blocks:yes — Documented check outcomes are never recordedDisposition: corrected and verified by execution. The documented outcome contract no longer promises check counts that the structured-result protocol does not provide. CI state remains in the published review comment. The new No other prior findings were recorded. No new findings were added. Security triageThe change still touches observability and persisted telemetry, so the security audit was repeated against the current accumulated change. No confirmed vulnerability was found in the changed surfaces. The follow-up only narrows the documented outcome set and adds a test; it does not add a new input or trust boundary. External agent providers and a deployed telemetry database were not exercised. Verification
CIAll current GitHub checks passed: Residual risksExternal agent providers and a deployed telemetry database were not part of execution-backed verification. The change records only outcomes available through the current structured-result protocol. VerdictApprove. REV-001 is corrected and verified; there are no open blocking findings. |
Work item: #37 — #37
What changes
The cycle now records what a run went on to produce, on rows kept apart from the pre-routing
dispatchrows introduced in #35. Adispatchrow is written once, before its stage's result is known, and nothing is ever added to it.Correlation (
telemetry.CORRELATION_FIELDS, payload only):cycle_id— minted perCycleRecorder(or passed explicitly), validated as an identifier before anything is dispatched; two runs of one work item stay apart.stage_seq— numbersstage()calls; a rerouted attempt shares its stage's number, and a verdict carries the number of the dispatch it reports on.record_kind—dispatch|verdict|cycle.Outcomes (
telemetry.OUTCOME_FIELDS, one source row each):verdict:status,findings_*by severity,tests_passed(only from a booleantests.passedin the structured result),checks_*.cycle:first_review_status,first_pass_approved,resolution_needed,resolution_rounds(only once a first review reachedAPPROVED/CHANGES_REQUESTED);final_review_status,final_approved; latesttests_passed;fallback_stages,contract_violations(always observed by the recorder).Telemetry.cycle_outcome(repo_id, cycle_id)reassembles a run — dispatches, verdicts and closing outcome — and reportsclosed: falsefor a run that never closed.Acceptance criteria
ReconstructionTests,DispatchObservationTests,DriverTests.FIELD_SPECSwith type/bounds/vocabulary;AllowlistTests.SeparationTestschecks dispatch rows are byte-identical after verdict/close, carry no outcome field, and that outcome, correlation and pre-routing sets are disjoint.UnknownIsNotDefaultTests(no verdict,BLOCKEDreview, unclosed run, verdict without findings, unreadabletests).profileon the dispatch row, keyed by(cycle_id, stage_seq); nothing records a suggestion yet.payload;LegacyRowTestsand the updated schema-compatibility test.Out of scope, as the issue states: no routing change, no Jev decision, no thresholds, no prose/paths/diffs stored.
Verification
python3 scripts/validate-package.py→VALID: 12 skills (6 cycle, 6 supporting), shared sections in sync, cross-agent manifests alignedpython3 -m unittest discover -s tests→Ran 552 tests … OK(17 new intests/test_cycle_outcomes.py)Notes
resolution_roundscounts theresolvestages the run attempted, including a blocked one.used_fallbackcolumn still defaults to0on non-dispatch rows (unchanged); the cycle-level fallback fact isfallback_stages.Closes #37