docs: adoption-slices spec + implementation plan - #18
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9fe899cfa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if report.get("ok") is True: | ||
| return 0 |
There was a problem hiding this comment.
Enforce evidence checks in the Stop firewall
When a terminal has state="Succeeded", at least one true criteria_met entry, false_completion: false, but an empty evidence array, this branch lets the stop pass because it trusts loop doctor's ok:true. I checked the current validator: _check_terminal_contradiction only rejects false_completion=true or no true criterion, and terminal.schema.json allows an empty evidence array. That means the A1 hook misses an evidence-free success even though the plan's G1/README claims say it must be blocked; add an explicit evidence check here or extend doctor plus a fixture for this case.
Useful? React with 👍 / 👎.
| with runlog.open("a", encoding="utf-8") as fh: | ||
| fh.write("\n".join(lines)) |
There was a problem hiding this comment.
Validate state before appending to RUNLOG
If .loop/state.json is unreadable, _read_state(paths) raises EmitError after the RUNLOG has already been appended, so the API violates its own EmitError contract that nothing is written when a write is refused and leaves a partial iteration in exactly the malformed-contract case. Read and validate the state before opening RUNLOG, or roll back the append on failure.
Useful? React with 👍 / 👎.
| issues: list[dict] = [] | ||
| _validate_record(record, "receipt", receipts, _validation_mode(), issues) | ||
| if issues: | ||
| raise EmitError(f"receipt failed schema validation: {issues}") |
There was a problem hiding this comment.
Check receipt fields without jsonschema
In supported zero-dependency installs, _validation_mode() can return structural-fallback, and the current fallback record checker only enforces required fields and const values, not receipt property types such as tokens, cost_usd, or model. With this implementation, append_receipt(..., tokens="bad") can be written as schema-invalid JSONL despite the writer's schema-valid-by-construction guarantee; add explicit runtime checks for these fields or avoid relying on the fallback for receipts.
Useful? React with 👍 / 👎.
| /tmp/smoke/bin/loop-engineer --version | ||
| /tmp/smoke/bin/loop scaffold /tmp/smoke-loop | ||
| /tmp/smoke/bin/loop doctor /tmp/smoke-loop | ||
| /tmp/smoke/bin/loop inspect /tmp/smoke-loop || true |
There was a problem hiding this comment.
Assert inspect succeeds in the publish smoke
Because || true hides every failure from loop inspect, the tag-publish smoke test would still proceed if the wheel cannot import the bundled inspector or emits invalid output; it only proves doctor ran. Since this workflow is the release gate for publishing the artifact, capture the inspect output and tolerate only the expected weak verdict/exit code while still parsing valid JSON.
Useful? React with 👍 / 👎.
Design + implementation plan for the pre-launch adoption slices (S0 PyPI substrate, B1 emit API + LangGraph recipe, A1 Stop-hook firewall, C1 CI action + pre-commit, launch docs).
Docs-only — no runtime changes. Implementation PRs follow, each independently shippable; launch gates on PR1+PR5 only.