okl export writes stamps made on other branches into this branch's snapshot
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #382 by @emeraldleaf — merged
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 54/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- developer-experience
Research direction
Read src/okl/drift.py, especially _on_this_branch() and drift.snapshot(), then trace how okl export and the refresh in okl verify build snapshots. Check the two branch cases in the issue: exporting on A should retain A’s committed entry for a lesson stamped on B, while exporting on B should include B’s stamp. Confirm A’s gate stays green and held back lessons are named.
Written by the indexing model from the issue text.
Description
Where it stands (main, 24784b4)
One store serves every branch of a checkout. drift.snapshot() (src/okl/drift.py:474) writes every file-governed lesson with its latest stamp, whichever branch that stamp was made on. In a consumer repo with stacked PRs (A ← B ← C), a lesson stamped on B's commit went into A's snapshot. Its governed file differs on A, so A's gate went red for a lesson A never touched. The agent rebuilt A's snapshot by hand: A's committed entries, plus the two it had changed.
drift._on_this_branch() (src/okl/drift.py:110) already tells whether a stamp's commit is reachable from HEAD, and okl drift uses it to report off-branch stamps (#126). okl export and the refresh that okl verify does do not use it.
Proposal
Export writes a lesson's stamp only when its commit is reachable from HEAD. For any other lesson it keeps the entry already committed in the snapshot, or leaves the lesson out when there is none. It names each lesson it held back.
Tests
- A two-branch fixture: a lesson stamped on branch B, exported on branch A, keeps A's committed entry, and A's gate stays green.
- Exported on B, it carries B's stamp.
Related
- On branch A,
okl reverifyreported "check FAILED (exit 4)" for two lessons whose test files exist only on later branches. Not stamping them was right, but "the check's files are not on this branch" would say what happened. - #242 (a merge driver for the snapshot) and #239.
🤖 Generated with Claude Code
- Dominant language
- Python
- Stars
- 1
- Forks
- 1
- Avg merge
- 5h 50m
- Merged PRs (30d)
- 125
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
-
Renamed seed packs orphan the records of stores seeded before the renamePossibly taken @emeraldleaf claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 54/100
emeraldleaf/okl#379 ·
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
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
pylint-dev/pylint#11791 ·
Maintainers usually reply within 1 day
-
Rasterio granule reads never retry, so one 503 (Service Unavailable) fails the whole requestPossibly taken @chuckwondo claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
developmentseed/titiler-cmr#305 ·
Maintainers usually reply within 1 day
-
community enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day