Repository navigation
Keep incomplete required foundation unpublished and resumable - #310
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 955d65b4b7
ℹ️ 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".
| def _publish(self, changed: dict[str, str]) -> InitRecord: | ||
| targets = self.record.coverage.get("knowledge", {}).get("targets", {}) | ||
| if (self.rt.unlimited_subscription and not self.dry_run | ||
| and targets.get("required") is True and targets.get("met") is not True): |
There was a problem hiding this comment.
Gate incomplete runs before the empty fast-path
Move this required-target check earlier than _publish: _Stage._conclude returns an empty record without calling _publish whenever changed is empty. If the merged base already contains contracts/feature metadata but a required facet remains missing and the generator or judge produces no approved replacement, an unlimited publication run therefore reports empty; knowledge.init treats that status as success and the CLI exits 0 despite targets.met being false. The incomplete-target gate must also cover this no-diff path.
Useful? React with 👍 / 👎.
A required subscription foundation run could publish a partial, immutable PR while feature coverage was still incomplete. Switching a preview to publication also changes the frozen input identity, so neither path supports completing the same paid batch safely.
Keep unlimited-subscription publication blocked before preparing or pushing a PR until the required feature and production-file targets are met. The genuine foundation checkpoint retains its approved facets; rerunning the same pinned publication batch restores them, extracts only the missing facets, and publishes once coverage passes. This is an eight-line publication guard with no prompt, model, identity, or evidence-policy changes.
Validation: 109 relevant tests pass. A scripted native transport regression preserves 17 archived approval artifacts, blocks incomplete publication without creating a prepared file or PR, retries only one missing facet with two calls, and then publishes successfully. Compatibility cases cover finite runs, previews, optional policies, and completed targets. Doc citation scanning, SPEC freshness, and diff checks pass.