okl record --files with no check turns the drift gate red without saying so

Closed Beginner friendly
#377 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #381 by @emeraldleaf — merged

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
cli

Research direction

Start by tracing the okl record command and its existing --files handling, then check how its tests assert stdout, stderr, and exit codes. Add coverage for the warning with the new lesson id and for no warning without --files; done means both cases pass and the exit code remains 0. The issue leaves open whether recording should instead be refused, so that behavior needs a decision before implementation.

Written by the indexing model from the issue text.

Description

Where it stands (main, 24784b4)

okl record --files <paths> with no check is accepted, and prints only the new id. Drift then reports the lesson: "governed source has commits but the rule was never verified" (src/okl/drift.py:193). Where the gate runs, the next push or CI run goes red for a lesson that was only just recorded. In one consumer repo this kept its okl-verify job red until another agent cleared the lesson's --files to unblock it, which removed the watch the lesson was recorded to have.

Proposal

When --files is given and no check has passed, okl record still records the lesson. It then prints a warning to stderr that drift will report the lesson until it is verified, and the exact next command, okl verify <id> --run "<check>" --expect "<signal>", with the new id filled in. Exit code unchanged.

Open

Whether to refuse instead unless --pending is passed. A warning keeps the encoding cheap. A refusal makes the red gate impossible to reach by accident.

Tests

  • okl record --files src/x.py ... prints the verify hint naming the new id, on stderr, and exits 0.
  • okl record without --files prints no hint.

🤖 Generated with Claude Code

Dominant language
Python
Stars
1
Forks
1
Avg merge
5h 50m
Merged PRs (30d)
125

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from emeraldleaf/okl

All issues in emeraldleaf/okl

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.