CI should notice a snapshot edited around the gate: rules that vanish, stamps that advance without a run
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
Start by reading the shipped workflow and its three copies, then trace how okl export --drift, okl verify, and drift.stamp_problem represent snapshots and receipts. Add the pull request comparison as a separate logged step, preserving byte-identical workflows and a standard-library-only workflow test. Done when the acceptance cases pass, including the push skip and older snapshots without retired.
Written by the indexing model from the issue text.
Description
Problem
CI's gate reads the committed snapshot okl-drift.json and judges each rule as the snapshot describes it. A branch can change the snapshot as well as the code: advance a rule's verification by hand, or drop a rule from the snapshot, and the gate on that branch is green. The repository's principle is that removal is recorded, never deleted (retire with a reason), and nothing in CI holds it.
Where it stands (verified 2026-10-20)
- The snapshot is written by
okl export --driftand refreshed byokl verify; CI never writes it. It carriesfiles,id,scope,title,type,verified_at,verified_by(the evidence receipt: command, expected signal, commit, minute;_stored_checkparses the command back out) andverified_commitper rule. It carries no retirements and no check runs. drift.stamp_problemrefuses a snapshot whose stamp is internally inconsistent, so averified_committhat disagrees with its receipt is caught. A receipt rewritten wholesale is not, and a rule deleted from the snapshot leaves no trace.- The workflow runs on
pull_request(base branch reachable;fetch-depth: 0) and onpushtomain, where there is no base.
Proposal
In the shipped workflow, after the gate and only on pull_request, compare the PR's snapshot with the base branch's:
- A rule that disappeared must be explained: the snapshot gains a
retiredlist (id, kind, reason, when) written byokl export --driftfrom the retirement log, and CI fails when an id present in the base snapshot is absent from both the PR's rules and itsretiredlist. Removingfilesfrom a lesson is the other legitimate exit and is listed the same way (unwatched). - A verification that advanced (
verified_atlater than the base's) must carry a receipt whose commit is an ancestor of the PR head and whose command equals the command in the base snapshot's receipt; a changed check is a deliberate change that must show in the diff. CI fails otherwise. This extends whatstamp_problemchecks today. - The comparison is a separate step with its own line in the job log, so a failure says which rule and which condition.
Older snapshots without the retired list pass the first check with a note, so existing repos are not broken on upgrade.
Interaction with #213: a rule that one teammate's clone never held would now fail CI as "disappeared without retirement" when that clone exports. That is the intended tightening; #213's guard (refuse an export that drops rules the committed snapshot holds) is the local half of the same rule.
Acceptance
- A PR that deletes a rule from the snapshot fails CI; the same PR with a retirement in the list passes.
- A PR that edits
verified_atby hand fails CI; a PR whose re-verification ranokl verifypasses. - The step is skipped on
pushtomainand says so. - The three workflow copies stay byte-identical; any test that reads the workflow keeps to the standard library.
Related: #213 (the snapshot rebuilt from one clone's store), #231 (TTL in the snapshot).
- Dominant language
- Python
- Stars
- 1
- Forks
- 1
- Avg merge
- 5h 22m
- Merged PRs (30d)
- 119
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from emeraldleaf/okl
-
enhancement loop-review
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
emeraldleaf/okl#190 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
emeraldleaf/okl#147 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 36/100
emeraldleaf/okl#365 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
emeraldleaf/okl#357 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
emeraldleaf/okl#349 ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
FinanceFlash/unvibecode#509 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
FAIRmat-NFDI/nomad-distro-dev#161 ·
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
modelcontextprotocol/python-sdk#3821 · 1 comment ·
Maintainers usually reply within 1 day
-
bug severity:low
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
Log-odds calibration uses upper middle score instead of median for even candidate setsPossibly taken @flysheep-ai claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day