fix(criterion): reject future-dated performance evidence - #72
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughcriterion observation 트리거가 ChangesCriterion observation chronology
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The trigger now rejects criterion observations recorded before their observation time, preventing future-dated performance evidence from being accepted. No actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant QualityWorkflow
participant PostgreSQL
participant ObservationTrigger
QualityWorkflow->>PostgreSQL: criterion_observation INSERT 실행
PostgreSQL->>ObservationTrigger: enforce_criterion_observation_scope 호출
ObservationTrigger-->>PostgreSQL: 지정 오류 메시지와 함께 23514 반환
PostgreSQL-->>QualityWorkflow: 실패 출력 반환
QualityWorkflow->>QualityWorkflow: 오류 메시지 검증
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@opencode-agent Please review the current unchanged head against protected |
Scope
Hardens criterion-observation chronology without rewriting the already-installed
0011migration or replacing its trigger binding. Valid delta to preserve:0014_criterion_observation_chronology.sqlrejects impossible recorded-before-observed/future chronology,0015_criterion_observation_statement_default.sqluses PostgreSQL statement time for omittedrecorded_from, and the PostgreSQL contract covers the long-transaction boundary.Live authority correction
Exact feature head remains
a8ddab514ebf5e09c44186862884b4b9b4e6f4dd. The PR is open · Draft and GitHub reports it non-mergeable. Its recorded develop-era base is9e3e4847510e1e612b48474ba42b177b8ed824df, while live protecteddevelopiseb9757f8649aaad026a9865508d9aad50c1a7a4fthrough #161 repository-quality consolidation.Fresh ancestry inspection shows protected
9e3e484... → eb9757f...is only three commits, but it materially overlaps this feature in exactly the surfaces that must be reconciled rather than chosen wholesale: protected #161 removes.github/workflows/criterion-temporal-quality.yml, modifies canonical.github/workflows/foundation-ci.yml, adds its consolidation entry toCHANGELOG.md, rebuildsmanifest.json, and removes the retiredjob-analysis-api-quality.ymlrequirement from bothscripts/foundation-contract-core.mjsandtests/validate_repository.py. The chronology migrations, ADR 0009,docs/TRACEABILITY.md, andtests/test_criterion_observation_scope_postgres.share not changed by the protected-parent delta and therefore remain preservable feature evidence.Historical exact-head acceptance on
a8ddab51...remains useful predecessor evidence: Foundation33268250168, Criterion Temporal Quality33268250121, Recovery33268250146, SAST33268250134, Job-Analysis API33268250166, Selection Review33268250154, and Requisition Review33268250160were terminal SUCCESS. Security33268250126failed. These runs predate protected #161 and cannot be transferred to a reconciled successor.All currently visible inline review findings are resolved. The valid repair chain includes: sequential
0014instead of rewriting installed0011; explicit rejection of futureobserved_at; explicit rejection of futurerecorded_from; and0015statement-time default so a long transaction can still record a newly observed event without weakening explicit chronology validation.Required repair path
This is a repair finding, not a close candidate. Build the successor tree from current protected truth without force/destructive rebase and preserve the chronology migrations/tests/ADR/traceability semantics. Reconciliation must:
.github/workflows/criterion-temporal-quality.ymldeleted and use canonical Foundation CI's isolated PostgreSQL contract path;tests/test_criterion_observation_scope_postgres.sh, including trigger-binding, future-observation, future-recording, UTC/system-time and long-transaction regressions;0014and0015to both canonical Python/Node required-file inventories while preserving fix(ci): use explicit Ubuntu 24.04 runners #161's removal of the retired job-analysis leaf workflow requirement;manifest.jsonfrom the final bytes rather than reusing either predecessor manifest;Only after that semantic tree is created should the branch obtain fresh exact-head Foundation/PostgreSQL/security/review evidence. Do not reuse predecessor GREEN, self-approve, use administrative bypass, weaken chronology constraints, drop historical-evidence semantics, resurrect package-local CI, force-push/destructively rebase, or simply Close the valid delta.