fix(core): harden recorded correction trust boundary - #73
Conversation
📝 WalkthroughWalkthrough
Changes기록 구간 수정 무결성
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🟡 Moderate · up to This PR hardens the correction boundary but still allows a caller-defined timestamp subtype in an existing recorded interval to influence chronology, which could create an invalid correction interval. Merge should wait for exact start-time validation and regression coverage. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 2 files. (4 skipped: 4 unsupported.) ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 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 |
|
@opencode-agent Please review exact current head |
Verified protected-main defect
Protected
develop@9e3e4847510e1e612b48474ba42b177b8ed824dfexposedclose_recorded_interval(...)as a public HRIS-kernel correction boundary but trusted any caller-owned dataclass carrying aRecordedInterval. It also compared chronology against caller-controlleddatetimesubclasses before establishing exact trusted temporal primitives. A foreign dataclass could be returned as a corrected kernel fact, and hostile datetime behavior could forge chronology.RED → root-cause repair
d24f940a5f81a829419253dbbe9f768293643c2badds regressions for a caller-owned fact shape and a hostile datetime subtype.739e26581095fedd0a18335f2311f972f6b13507narrows the boundary to the four authoritative kernel fact types, exactRecordedInterval, and exact built-in timezone-awaredatetimevalues before attribute-driven trust or comparison.efd87f45417031662382b0c901110f19206488d5covers malformed recorded history;01f18286f2a1ec8052ec88c2a3ec69f83d50394dcompletes adversarial datetime ordering;cbc6dfb374e8ae43df0cadce39aab44dc78fec94validates both recorded endpoints before comparison and narrows UUID parsing failure handling toValueError.b4cad54cf6067b672c71eb41c87fd62d75097bb3scopes the defect statement to the authoritative protected snapshot, records the earlier protected snapshot as lineage only, and makes predecessor-head evidence non-transfer explicit._ForgedDateTime.__lt__,__le__, and__gt__; the older GitHub Code Quality note claiming incomplete ordering is stale and does not identify a current defect.Scope boundary
Orgmetra-only HRIS-kernel correction hardening. No dedicated-writer dependency repository is modified, no cross-service application-table SQL is introduced, and this branch does not modify the interval implementation owned by PR #69. This PR has no buyer-facing UI delta; Orgmetra's existing Figma/Storybook token and component authority is therefore preserved rather than forked.
Exact-current-head evidence
Current exact head:
b4cad54cf6067b672c71eb41c87fd62d75097bb3.Fresh protected base:
develop@9e3e4847510e1e612b48474ba42b177b8ed824df.GitHub reports the PR open, ready-for-review, and mergeable.
Fresh exact-head verification:
@opencode-agentrequest is posted for this exact SHA and explicitly requires the authorizedNVIDIA_NIM_API_KEYpath; predecessor/status-only evidence must not be reused.Merge governance
Do not merge while OpenCode is fail-closed, Strix is absent, or independent human approval is missing. Orgmetra commercial governance requires at least two qualifying independent non-author approvals and approval after the latest push even though the inherited live organization ruleset is currently weaker. Re-run/review only through the authorized central workflow/provider path; do not create an empty retrigger commit, self-approve, weaken a gate, manufacture synthetic evidence, broaden agent credentials, or use routine OrganizationAdmin bypass. Immediately before any merge decision, refetch exact head/base/reviews/threads/rules/checks and use expected-head protection.