okstra 0.229.0 → 0.231.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -5
- package/dist/cli-registry.mjs +0 -18
- package/dist/cli-registry.mjs.map +1 -1
- package/dist/commands/lifecycle/doctor.mjs +0 -15
- package/dist/commands/lifecycle/doctor.mjs.map +1 -1
- package/dist/lib/skill-catalog.mjs +4 -4
- package/dist/lib/skill-catalog.mjs.map +1 -1
- package/docs/architecture/storage-model.md +168 -18
- package/docs/architecture.md +15 -14
- package/docs/coding-rules.md +15 -0
- package/docs/contributor-change-matrix.md +5 -5
- package/docs/project-structure-overview.md +13 -19
- package/package.json +2 -3
- package/runtime/BUILD.json +2 -2
- package/runtime/bin/lib/okstra/interactive.sh +2 -1
- package/runtime/prompts/coding-preflight/clean-code.md +8 -0
- package/runtime/prompts/coding-preflight/overview.md +1 -0
- package/runtime/prompts/launch.template.md +7 -5
- package/runtime/prompts/lead/convergence.md +4 -4
- package/runtime/prompts/lead/okstra-lead-contract.md +19 -18
- package/runtime/prompts/lead/phase-routing.md +1 -1
- package/runtime/prompts/lead/report-writer.md +3 -3
- package/runtime/prompts/lead/team-contract.md +3 -3
- package/runtime/prompts/profiles/_coding-conventions-preflight.md +2 -0
- package/runtime/python/okstra_ctl/agent/invocation.py +190 -9
- package/runtime/python/okstra_ctl/agent/prompt_cli/materialize.py +31 -1
- package/runtime/python/okstra_ctl/blocking_checks.py +10 -0
- package/runtime/python/okstra_ctl/cmux.py +4 -2
- package/runtime/python/okstra_ctl/code_review_census.py +194 -0
- package/runtime/python/okstra_ctl/code_review_coverage.py +3 -1
- package/runtime/python/okstra_ctl/code_review_scope.py +9 -6
- package/runtime/python/okstra_ctl/code_review_target.py +38 -2
- package/runtime/python/okstra_ctl/conformance.py +30 -0
- package/runtime/python/okstra_ctl/conformance_evidence.py +316 -0
- package/runtime/python/okstra_ctl/correction_round.py +19 -13
- package/runtime/python/okstra_ctl/dispatch_core.py +1 -1
- package/runtime/python/okstra_ctl/dispatch_state.py +1 -0
- package/runtime/python/okstra_ctl/execution_mutation_audit.py +13 -1
- package/runtime/python/okstra_ctl/generated_input.py +21 -0
- package/runtime/python/okstra_ctl/ids.py +1 -41
- package/runtime/python/okstra_ctl/incremental_carry.py +7 -4
- package/runtime/python/okstra_ctl/initial_prompt_materialization.py +30 -0
- package/runtime/python/okstra_ctl/interactive_cli.py +5 -0
- package/runtime/python/okstra_ctl/locks.py +28 -1
- package/runtime/python/okstra_ctl/model_io/renderers.py +7 -0
- package/runtime/python/okstra_ctl/paths.py +90 -33
- package/runtime/python/okstra_ctl/phases/catalog.py +3 -0
- package/runtime/python/okstra_ctl/phases/change_impact_analysis/spec.md +2 -2
- package/runtime/python/okstra_ctl/phases/discussion/spec.md +63 -63
- package/runtime/python/okstra_ctl/phases/discussion/wizard.py +2 -11
- package/runtime/python/okstra_ctl/phases/error_analysis/report_assets/error-analysis-input.template.md +1 -1
- package/runtime/python/okstra_ctl/phases/error_analysis/spec.md +2 -2
- package/runtime/python/okstra_ctl/phases/feature_analysis/spec.md +1 -1
- package/runtime/python/okstra_ctl/phases/final_verification/profile.md +5 -4
- package/runtime/python/okstra_ctl/phases/final_verification/report_assets/final-verification-input.template.md +1 -1
- package/runtime/python/okstra_ctl/phases/final_verification/report_assets/final-verification.template.html +8 -0
- package/runtime/python/okstra_ctl/phases/final_verification/spec.md +5 -4
- package/runtime/python/okstra_ctl/phases/final_verification/validation.py +53 -0
- package/runtime/python/okstra_ctl/phases/implementation/host-rules.md +6 -2
- package/runtime/python/okstra_ctl/phases/implementation/instructions/_implementation-deliverable.md +4 -2
- package/runtime/python/okstra_ctl/phases/implementation/instructions/_implementation-executor.md +1 -1
- package/runtime/python/okstra_ctl/phases/implementation/instructions/_implementation-verifier.md +23 -7
- package/runtime/python/okstra_ctl/phases/implementation/report_assets/implementation-input.template.md +1 -1
- package/runtime/python/okstra_ctl/phases/implementation/report_assets/implementation.template.html +1 -1
- package/runtime/python/okstra_ctl/phases/implementation/spec.md +6 -4
- package/runtime/python/okstra_ctl/phases/implementation/validation.py +152 -30
- package/runtime/python/okstra_ctl/phases/implementation_option_selection/spec.md +2 -2
- package/runtime/python/okstra_ctl/phases/implementation_planning/authoring.py +16 -22
- package/runtime/python/okstra_ctl/phases/implementation_planning/instructions/plan-body-verification.md +12 -12
- package/runtime/python/okstra_ctl/phases/implementation_planning/plan_body.py +14 -0
- package/runtime/python/okstra_ctl/phases/implementation_planning/profile.md +4 -4
- package/runtime/python/okstra_ctl/phases/implementation_planning/report_assets/implementation-planning-input.template.md +1 -1
- package/runtime/python/okstra_ctl/phases/implementation_planning/spec.md +1 -1
- package/runtime/python/okstra_ctl/phases/implementation_planning/wizard.py +11 -4
- package/runtime/python/okstra_ctl/phases/project_analysis/spec.md +2 -2
- package/runtime/python/okstra_ctl/phases/release_handoff/entry.py +7 -3
- package/runtime/python/okstra_ctl/phases/release_handoff/operations.py +4 -5
- package/runtime/python/okstra_ctl/phases/release_handoff/profile.md +1 -1
- package/runtime/python/okstra_ctl/phases/release_handoff/report_assets/release-handoff-input.template.md +1 -1
- package/runtime/python/okstra_ctl/phases/release_handoff/spec.md +4 -4
- package/runtime/python/okstra_ctl/phases/technical_verification/spec.md +1 -1
- package/runtime/python/okstra_ctl/plan_items.py +28 -0
- package/runtime/python/okstra_ctl/process_group.py +26 -3
- package/runtime/python/okstra_ctl/qa_commands.py +5 -1
- package/runtime/python/okstra_ctl/recap.py +1 -2
- package/runtime/python/okstra_ctl/render.py +25 -2
- package/runtime/python/okstra_ctl/report_assembly.py +102 -1
- package/runtime/python/okstra_ctl/report_execution_evidence.py +220 -0
- package/runtime/python/okstra_ctl/report_finalize.py +3 -3
- package/runtime/python/okstra_ctl/report_inputs.py +28 -0
- package/runtime/python/okstra_ctl/report_narrative.py +12 -3
- package/runtime/python/okstra_ctl/report_synthesis_packet.py +5 -0
- package/runtime/python/okstra_ctl/run.py +40 -20
- package/runtime/python/okstra_ctl/stage_close.py +52 -6
- package/runtime/python/okstra_ctl/stage_command_commits.py +143 -0
- package/runtime/python/okstra_ctl/stage_fix_carry.py +21 -1
- package/runtime/python/okstra_ctl/stage_integrate.py +90 -25
- package/runtime/python/okstra_ctl/verification_capture.py +291 -0
- package/runtime/python/okstra_ctl/verification_conformance.py +28 -9
- package/runtime/python/okstra_ctl/verification_dispatch.py +136 -0
- package/runtime/python/okstra_ctl/verification_evidence.py +671 -0
- package/runtime/python/okstra_ctl/verification_generation.py +34 -16
- package/runtime/python/okstra_ctl/verification_input_ref.py +9 -0
- package/runtime/python/okstra_ctl/verification_input_types.py +2 -0
- package/runtime/python/okstra_ctl/verification_inputs.py +83 -2
- package/runtime/python/okstra_ctl/verification_invocation.py +140 -0
- package/runtime/python/okstra_ctl/verification_target.py +10 -3
- package/runtime/python/okstra_ctl/wizard/engine.py +23 -0
- package/runtime/python/okstra_ctl/wizard/registry.py +2 -1
- package/runtime/python/okstra_ctl/wizard/render.py +2 -1
- package/runtime/python/okstra_ctl/wizard/sources.py +14 -3
- package/runtime/python/okstra_ctl/wizard/steps_identity.py +2 -1
- package/runtime/python/okstra_ctl/wizard/steps_plan.py +6 -2
- package/runtime/python/okstra_ctl/worker_runner.py +1 -1
- package/runtime/python/okstra_ctl/worktree/git_ops.py +8 -1
- package/runtime/python/okstra_ctl/worktree/rebase.py +5 -2
- package/runtime/python/okstra_ctl/worktree_lock_cli.py +70 -17
- package/runtime/python/okstra_ctl/worktree_registry.py +4 -0
- package/runtime/schemas/final-report-v3.0.schema.json +184 -1
- package/runtime/skills/okstra-code-review/SKILL.md +7 -5
- package/runtime/skills/okstra-code-review/references/census-rules.md +2 -2
- package/runtime/skills/okstra-explain-flow/SKILL.md +1 -1
- package/runtime/skills/okstra-run/SKILL.md +11 -7
- package/runtime/skills/okstra-schedule-gen/SKILL.md +3 -3
- package/runtime/skills/okstra-setup/SKILL.md +2 -3
- package/runtime/templates/reports/html/i18n/en.json +7 -0
- package/runtime/templates/reports/html/i18n/ko.json +7 -0
- package/runtime/validators/validate-run.py +130 -20
- package/runtime/validators/validate-workflow.sh +1 -1
- package/docs/cli.md +0 -1060
- package/docs/container.md +0 -100
- package/docs/follow-ups/2026-07-10-final-report-option-3.md +0 -51
- package/docs/performance-improvement-plan-v2.md +0 -369
- package/runtime/python/okstra_ctl/container.py +0 -702
- package/runtime/python/okstra_ctl/rollup.py +0 -241
- package/runtime/python/okstra_ctl/usage_report.py +0 -362
- package/runtime/skills/okstra-container-build/SKILL.md +0 -139
- package/runtime/skills/okstra-inspect/SKILL.md +0 -100
- package/runtime/skills/okstra-inspect/facets/cost.md +0 -84
- package/runtime/skills/okstra-inspect/facets/error-zip.md +0 -41
- package/runtime/skills/okstra-inspect/facets/errors.md +0 -69
- package/runtime/skills/okstra-inspect/facets/history.md +0 -86
- package/runtime/skills/okstra-inspect/facets/logs.md +0 -89
- package/runtime/skills/okstra-inspect/facets/recap.md +0 -167
- package/runtime/skills/okstra-inspect/facets/report.md +0 -57
- package/runtime/skills/okstra-inspect/facets/run-audit.md +0 -34
- package/runtime/skills/okstra-inspect/facets/status.md +0 -163
- package/runtime/skills/okstra-inspect/facets/time.md +0 -57
- package/runtime/skills/okstra-rollup/SKILL.md +0 -75
- package/runtime/skills/okstra-usage/SKILL.md +0 -71
|
@@ -469,6 +469,11 @@
|
|
|
469
469
|
"diff-summary": "Diff summary",
|
|
470
470
|
"uncommitted-state": "Uncommitted state",
|
|
471
471
|
"per-stage-reports": "Per-stage reports",
|
|
472
|
+
"read-only-commands": "Read-only commands",
|
|
473
|
+
"tier": "Tier",
|
|
474
|
+
"command": "Command",
|
|
475
|
+
"exit-code": "Exit code",
|
|
476
|
+
"execution-record": "Execution record",
|
|
472
477
|
"release-path": "Release path",
|
|
473
478
|
"the-current-verdict-does-not-allow-release-h": "The current verdict does not allow release-handoff to start. Clear the blocker or the condition first.",
|
|
474
479
|
"next-step": "Next step",
|
|
@@ -649,6 +654,8 @@
|
|
|
649
654
|
"independent-check": "Independent check:",
|
|
650
655
|
"independent-rerun": "Independent re-run:",
|
|
651
656
|
"command-log": "Command log:",
|
|
657
|
+
"execution-records": "Execution records:",
|
|
658
|
+
"incomplete-collection": "incomplete collection",
|
|
652
659
|
"discrepancy": "Discrepancy:",
|
|
653
660
|
"exit-code": "exit code",
|
|
654
661
|
"what-is-left": "What is left",
|
|
@@ -469,6 +469,11 @@
|
|
|
469
469
|
"diff-summary": "diff 요약",
|
|
470
470
|
"uncommitted-state": "커밋되지 않은 상태",
|
|
471
471
|
"per-stage-reports": "stage 별 리포트",
|
|
472
|
+
"read-only-commands": "읽기 전용 명령",
|
|
473
|
+
"tier": "등급",
|
|
474
|
+
"command": "명령",
|
|
475
|
+
"exit-code": "종료 코드",
|
|
476
|
+
"execution-record": "실행 기록",
|
|
472
477
|
"release-path": "릴리스 경로",
|
|
473
478
|
"the-current-verdict-does-not-allow-release-h": "현재 판정으로는 release-handoff 를 시작할 수 없습니다. 차단 항목이나 조건을 먼저 해소하세요.",
|
|
474
479
|
"next-step": "다음 단계",
|
|
@@ -649,6 +654,8 @@
|
|
|
649
654
|
"independent-check": "독립 검증:",
|
|
650
655
|
"independent-rerun": "독립 재실행:",
|
|
651
656
|
"command-log": "명령 기록:",
|
|
657
|
+
"execution-records": "실행 기록:",
|
|
658
|
+
"incomplete-collection": "수집 불완전",
|
|
652
659
|
"discrepancy": "불일치:",
|
|
653
660
|
"exit-code": "종료 코드",
|
|
654
661
|
"what-is-left": "남은 것",
|
|
@@ -42,6 +42,8 @@ from okstra_ctl.phases.implementation.validation import (
|
|
|
42
42
|
_validate_verifier_fail_blocks_verdict,
|
|
43
43
|
_validate_correction_rounds,
|
|
44
44
|
_validate_lead_fixes,
|
|
45
|
+
validate_settled_round_was_reverified,
|
|
46
|
+
validate_verifier_execution_evidence,
|
|
45
47
|
_validate_verifier_command_log_is_read_only as validate_verifier_command_log_is_read_only,
|
|
46
48
|
_validate_verifier_discrepancy_names_checklist_phase as validate_verifier_discrepancy_names_checklist_phase,
|
|
47
49
|
_warn_out_of_plan_edits_not_in_diff as warn_out_of_plan_edits_not_in_diff,
|
|
@@ -193,6 +195,11 @@ from okstra_ctl.conformance import (
|
|
|
193
195
|
qa_result_from_dict,
|
|
194
196
|
validate_conformance_manifest,
|
|
195
197
|
)
|
|
198
|
+
from okstra_ctl.conformance_evidence import ( # noqa: E402
|
|
199
|
+
RunConformanceEvidence,
|
|
200
|
+
collect_conformance_evidence,
|
|
201
|
+
)
|
|
202
|
+
from okstra_ctl.verification_conformance import conformance_stage # noqa: E402
|
|
196
203
|
from okstra_ctl.dispatch_state import ( # noqa: E402
|
|
197
204
|
DispatchError,
|
|
198
205
|
v2_worker_state_key,
|
|
@@ -222,7 +229,9 @@ from okstra_ctl.validation_contract import ( # noqa: E402
|
|
|
222
229
|
)
|
|
223
230
|
from okstra_ctl.blocking_checks import partition as partition_blocking # noqa: E402
|
|
224
231
|
from okstra_ctl import next_phase # noqa: E402
|
|
232
|
+
from okstra_ctl.report_execution_evidence import execution_evidence_contract # noqa: E402
|
|
225
233
|
from okstra_ctl.phases.final_verification.validation import ( # noqa: E402
|
|
234
|
+
validate_command_log_execution_evidence,
|
|
226
235
|
validate_final_verification_content,
|
|
227
236
|
validate_verification_target_match,
|
|
228
237
|
)
|
|
@@ -1925,6 +1934,68 @@ def _load_conformance_results(qa_dir: Path, manifest: dict) -> dict:
|
|
|
1925
1934
|
return results
|
|
1926
1935
|
|
|
1927
1936
|
|
|
1937
|
+
def _evidence_conformance_results(
|
|
1938
|
+
run_manifest_path: Path | None,
|
|
1939
|
+
project_root: Path | None,
|
|
1940
|
+
manifest: dict,
|
|
1941
|
+
scoped: dict,
|
|
1942
|
+
failures: list[str],
|
|
1943
|
+
) -> tuple[dict, dict, dict[str, str]] | None:
|
|
1944
|
+
"""Gated entries, results and unusable-record messages of a
|
|
1945
|
+
`verificationEvidenceVersion` run.
|
|
1946
|
+
|
|
1947
|
+
None for a run without that field, whose results stay the verifier-written
|
|
1948
|
+
sidecars. A marked run never reads a sidecar: a stage without an execution
|
|
1949
|
+
record has no result, and a stage whose latest records are no usable
|
|
1950
|
+
evidence is reported with those records instead of as never run.
|
|
1951
|
+
"""
|
|
1952
|
+
if run_manifest_path is None or project_root is None:
|
|
1953
|
+
return None
|
|
1954
|
+
run_manifest = load_json(run_manifest_path)
|
|
1955
|
+
if "verificationEvidenceVersion" not in run_manifest:
|
|
1956
|
+
return None
|
|
1957
|
+
entries = [entry for entry in manifest.get("entries", []) if isinstance(entry, dict)]
|
|
1958
|
+
evidence = RunConformanceEvidence(frozenset(), {})
|
|
1959
|
+
if run_manifest["verificationEvidenceVersion"] != "1.0":
|
|
1960
|
+
failures.append(
|
|
1961
|
+
"conformance gate BLOCKING: unsupported verification evidence version "
|
|
1962
|
+
f"{run_manifest['verificationEvidenceVersion']!r} in {run_manifest_path}"
|
|
1963
|
+
)
|
|
1964
|
+
else:
|
|
1965
|
+
try:
|
|
1966
|
+
evidence = collect_conformance_evidence(
|
|
1967
|
+
project_root, run_manifest_path,
|
|
1968
|
+
[entry["stageKey"] for entry in entries],
|
|
1969
|
+
)
|
|
1970
|
+
except ValueError as exc:
|
|
1971
|
+
failures.append(
|
|
1972
|
+
"conformance gate BLOCKING: verification execution evidence "
|
|
1973
|
+
f"could not be collected for {run_manifest_path}: {exc}"
|
|
1974
|
+
)
|
|
1975
|
+
gated = list(scoped.get("entries", []))
|
|
1976
|
+
for entry in entries:
|
|
1977
|
+
if entry not in gated and _entry_stage(entry) in evidence.stages:
|
|
1978
|
+
gated.append(entry)
|
|
1979
|
+
results = {
|
|
1980
|
+
key: stage.result for key, stage in evidence.results.items()
|
|
1981
|
+
if stage.result is not None
|
|
1982
|
+
}
|
|
1983
|
+
unusable = {
|
|
1984
|
+
key: summary for key, stage in evidence.results.items()
|
|
1985
|
+
if (summary := stage.unusable_summary()) is not None
|
|
1986
|
+
}
|
|
1987
|
+
return {"entries": gated}, results, unusable
|
|
1988
|
+
|
|
1989
|
+
|
|
1990
|
+
def _entry_stage(entry: dict) -> int | None:
|
|
1991
|
+
try:
|
|
1992
|
+
return conformance_stage(str(entry.get("stageKey")))
|
|
1993
|
+
except ValueError:
|
|
1994
|
+
# expected-miss: a stage key without a stage number names no stage a
|
|
1995
|
+
# generation can require; `_scope_manifest_entries` gates it by suffix.
|
|
1996
|
+
return None
|
|
1997
|
+
|
|
1998
|
+
|
|
1928
1999
|
def _diff_summary_files(report_data: Mapping[str, Any]) -> list[str]:
|
|
1929
2000
|
"""implementation 리포트가 신고한 변경 파일 목록 (`implementation.diffSummary.files[].file`).
|
|
1930
2001
|
|
|
@@ -2332,9 +2403,15 @@ def _validate_conformance(
|
|
|
2332
2403
|
failures: list[str],
|
|
2333
2404
|
surface_patterns: object = None,
|
|
2334
2405
|
approved_plan_path: Path | None = None,
|
|
2406
|
+
run_manifest_path: Path | None = None,
|
|
2407
|
+
project_root: Path | None = None,
|
|
2335
2408
|
) -> list[str]:
|
|
2336
2409
|
"""Tier 3 conformance 게이트(implementation / final-verification).
|
|
2337
2410
|
|
|
2411
|
+
A run manifest with `verificationEvidenceVersion` takes results from the
|
|
2412
|
+
verification execution records alone and also gates every stage its
|
|
2413
|
+
generations require, such as an earlier stage whose script changed.
|
|
2414
|
+
|
|
2338
2415
|
A missing task-level manifest is inert only without approved-plan evidence.
|
|
2339
2416
|
When a recorded approved plan declares conformance for the in-scope stage,
|
|
2340
2417
|
disappearance of that manifest is a blocking structural failure. Otherwise,
|
|
@@ -2425,9 +2502,16 @@ def _validate_conformance(
|
|
|
2425
2502
|
f"in {manifest_path}"
|
|
2426
2503
|
)
|
|
2427
2504
|
scoped = _scope_manifest_entries(manifest, stage_name)
|
|
2505
|
+
evidence = _evidence_conformance_results(
|
|
2506
|
+
run_manifest_path, project_root, manifest, scoped, failures,
|
|
2507
|
+
)
|
|
2508
|
+
gated, results, unusable = (
|
|
2509
|
+
evidence if evidence is not None
|
|
2510
|
+
else (scoped, _load_conformance_results(qa_dir, scoped), {})
|
|
2511
|
+
)
|
|
2428
2512
|
entries_by_key = {
|
|
2429
2513
|
entry.get("stageKey"): entry
|
|
2430
|
-
for entry in
|
|
2514
|
+
for entry in gated.get("entries", [])
|
|
2431
2515
|
if isinstance(entry, dict) and isinstance(entry.get("stageKey"), str)
|
|
2432
2516
|
}
|
|
2433
2517
|
for stage_key, entry in entries_by_key.items():
|
|
@@ -2444,8 +2528,7 @@ def _validate_conformance(
|
|
|
2444
2528
|
"conformance result or record a user-acknowledged waiver. See "
|
|
2445
2529
|
"docs/superpowers/specs/2026-06-07-stage-conformance-qa-design.md §7.1."
|
|
2446
2530
|
)
|
|
2447
|
-
|
|
2448
|
-
for verdict in evaluate_conformance(scoped, results):
|
|
2531
|
+
for verdict in evaluate_conformance(gated, results):
|
|
2449
2532
|
if verdict.status == "ADVISORY":
|
|
2450
2533
|
entry = entries_by_key.get(verdict.stage_key, {})
|
|
2451
2534
|
warnings.append(
|
|
@@ -2456,9 +2539,13 @@ def _validate_conformance(
|
|
|
2456
2539
|
f"manifest: {manifest_path}"
|
|
2457
2540
|
)
|
|
2458
2541
|
elif not verdict.ok:
|
|
2542
|
+
# `unusable` keys only result-less stages, whose BLOCKING verdict
|
|
2543
|
+
# reads "never ran"; their rejected records exist, so the records
|
|
2544
|
+
# and their defects replace that message.
|
|
2459
2545
|
failures.append(
|
|
2460
2546
|
f"conformance gate BLOCKING for stage {verdict.stage_key}: "
|
|
2461
|
-
f"{verdict.message}.
|
|
2547
|
+
f"{unusable.get(verdict.stage_key, verdict.message)}. "
|
|
2548
|
+
f"Run the stage's conformance script (or declare "
|
|
2462
2549
|
f"an exemption / user waiver) — see "
|
|
2463
2550
|
f"docs/superpowers/specs/2026-06-07-stage-conformance-qa-design.md."
|
|
2464
2551
|
)
|
|
@@ -2471,6 +2558,23 @@ def _validate_conformance(
|
|
|
2471
2558
|
return warnings
|
|
2472
2559
|
|
|
2473
2560
|
|
|
2561
|
+
def _validate_run_conformance(
|
|
2562
|
+
report_path: Path, run_manifest_path: Path, project_root: Path,
|
|
2563
|
+
failures: list[str],
|
|
2564
|
+
) -> list[str]:
|
|
2565
|
+
"""The conformance gate as `run_preflight` and `main` both run it."""
|
|
2566
|
+
return _validate_conformance(
|
|
2567
|
+
report_path,
|
|
2568
|
+
failures,
|
|
2569
|
+
surface_patterns=_project_surface_patterns(project_root),
|
|
2570
|
+
approved_plan_path=_approved_plan_path_from_run_inputs(
|
|
2571
|
+
run_manifest_path, failures
|
|
2572
|
+
),
|
|
2573
|
+
run_manifest_path=run_manifest_path,
|
|
2574
|
+
project_root=project_root,
|
|
2575
|
+
)
|
|
2576
|
+
|
|
2577
|
+
|
|
2474
2578
|
_TEST_FILE_RE = re.compile(r"(\.spec\.|\.test\.|(^|/)test_|_test\.|(^|/)tests?/)")
|
|
2475
2579
|
# okstra ships deliberately self-mocked samples as detector fixtures; gating
|
|
2476
2580
|
# them would make okstra permanently fail its own gate when verifying itself.
|
|
@@ -3056,6 +3160,7 @@ def validate_final_report_data(
|
|
|
3056
3160
|
*,
|
|
3057
3161
|
report_contracts: set[str] | None = None,
|
|
3058
3162
|
run_manifest: dict | None = None,
|
|
3163
|
+
run_manifest_path: Path | None = None,
|
|
3059
3164
|
project_root: Path | None = None,
|
|
3060
3165
|
clarification_text: str = "",
|
|
3061
3166
|
) -> Mapping[str, Any] | None:
|
|
@@ -3179,15 +3284,30 @@ def validate_final_report_data(
|
|
|
3179
3284
|
)
|
|
3180
3285
|
elif task_type == "implementation":
|
|
3181
3286
|
_validate_stage_carry_sidecar_exists(data, report_path, failures)
|
|
3182
|
-
|
|
3287
|
+
evidence_contract = execution_evidence_contract(manifest, failures)
|
|
3288
|
+
_validate_lead_fixes(
|
|
3289
|
+
data, failures, evidence_contract=evidence_contract is not False,
|
|
3290
|
+
)
|
|
3183
3291
|
_validate_lead_fix_carry_head(data, report_path, failures)
|
|
3184
3292
|
_validate_correction_rounds(data, manifest, failures)
|
|
3293
|
+
if (evidence_contract and run_manifest_path is not None
|
|
3294
|
+
and project_root is not None):
|
|
3295
|
+
validate_verifier_execution_evidence(
|
|
3296
|
+
data, project_root, run_manifest_path, manifest, failures,
|
|
3297
|
+
)
|
|
3298
|
+
validate_settled_round_was_reverified(
|
|
3299
|
+
data, project_root, run_manifest_path, manifest, failures,
|
|
3300
|
+
)
|
|
3185
3301
|
_validate_lead_authored_report(data, report_path, failures)
|
|
3186
3302
|
if task_type == "error-analysis":
|
|
3187
3303
|
_validate_error_analysis_consistency(data, failures)
|
|
3188
3304
|
elif task_type == "final-verification":
|
|
3189
3305
|
_validate_final_verification_consistency(data, failures)
|
|
3190
3306
|
_validate_verified_row_recorded(data, report_path, failures)
|
|
3307
|
+
if run_manifest_path is not None and project_root is not None:
|
|
3308
|
+
validate_command_log_execution_evidence(
|
|
3309
|
+
data, project_root, run_manifest_path, manifest, failures,
|
|
3310
|
+
)
|
|
3191
3311
|
elif task_type == "implementation-planning":
|
|
3192
3312
|
active_report_contracts = report_contracts or set()
|
|
3193
3313
|
planning = data.get("implementationPlanning") or {}
|
|
@@ -5758,13 +5878,8 @@ def run_preflight(report_path: Path, run_manifest_path: Path) -> int:
|
|
|
5758
5878
|
project_root = Path(
|
|
5759
5879
|
str(manifest.get("projectRoot") or run_manifest_path.parent)
|
|
5760
5880
|
)
|
|
5761
|
-
warnings =
|
|
5762
|
-
report_path,
|
|
5763
|
-
failures,
|
|
5764
|
-
surface_patterns=_project_surface_patterns(project_root),
|
|
5765
|
-
approved_plan_path=_approved_plan_path_from_run_inputs(
|
|
5766
|
-
run_manifest_path, failures
|
|
5767
|
-
),
|
|
5881
|
+
warnings = _validate_run_conformance(
|
|
5882
|
+
report_path, run_manifest_path, project_root, failures,
|
|
5768
5883
|
)
|
|
5769
5884
|
elif task_type == "implementation-planning":
|
|
5770
5885
|
from okstra_ctl.report_assembly import selected_direction_plan_errors
|
|
@@ -5972,6 +6087,7 @@ def main() -> int:
|
|
|
5972
6087
|
failures,
|
|
5973
6088
|
report_contracts=report_contracts,
|
|
5974
6089
|
run_manifest=run_manifest,
|
|
6090
|
+
run_manifest_path=run_manifest_path,
|
|
5975
6091
|
project_root=project_root,
|
|
5976
6092
|
clarification_text=_clarification_text_for_run(
|
|
5977
6093
|
run_manifest_path, report_path
|
|
@@ -6008,14 +6124,8 @@ def main() -> int:
|
|
|
6008
6124
|
failures,
|
|
6009
6125
|
)
|
|
6010
6126
|
if task_type in ("implementation", "final-verification"):
|
|
6011
|
-
conformance_warnings =
|
|
6012
|
-
report_path,
|
|
6013
|
-
failures,
|
|
6014
|
-
surface_patterns=_project_surface_patterns(project_root),
|
|
6015
|
-
approved_plan_path=_approved_plan_path_from_run_inputs(
|
|
6016
|
-
run_manifest_path,
|
|
6017
|
-
failures,
|
|
6018
|
-
),
|
|
6127
|
+
conformance_warnings = _validate_run_conformance(
|
|
6128
|
+
report_path, run_manifest_path, project_root, failures,
|
|
6019
6129
|
)
|
|
6020
6130
|
_validate_selfmock(report_path, failures)
|
|
6021
6131
|
for warning in conformance_warnings:
|
|
@@ -28,7 +28,7 @@ SOURCE_ASSET_ROOT="$WORKSPACE_ROOT/agents"
|
|
|
28
28
|
# Arbitrary sample task-type used only to exercise the bundle-prep /
|
|
29
29
|
# discovery-pointer / task-catalog / asset-seeding machinery via render-only
|
|
30
30
|
# run_okstra. Must NOT require --approved-plan (excludes implementation and
|
|
31
|
-
# final-verification) and must have a tests/fixtures/final-report-data/
|
|
31
|
+
# final-verification) and must have a tests/fixtures/final-report-data-v2/
|
|
32
32
|
# <task-type>-001.data.json sample (used by prepare_run_validator_fixture).
|
|
33
33
|
TASK_TYPE="requirements-discovery"
|
|
34
34
|
PRIMARY_TASK_GROUP="validation"
|