Repository navigation
fix(kb): ground and independently review subscription module cards - #312
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: c7231cdd6d
ℹ️ 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".
| allocation = (MAX_CARD_BYTES - before) // (len(readable) - offset) | ||
| limit = before + allocation | ||
| item.update(status="complete", ranges=ranges(lines, len(lines))) | ||
| if size() <= limit: |
There was a problem hiding this comment.
Backfill unused excerpt allocations before marking files partial
When an earlier file is larger than its equal share but later files are small, this loop permanently marks the earlier file partial against limit and never revisits it. Consequently, even when every complete numbered excerpt fits within the 40 KB cap, source lines are unnecessarily omitted—for example, a 1,500-line file followed by a one-line file produces a roughly 20 KB partial payload although the fully complete payload is only about 27 KB. Reallocate unused shares in a second pass, or determine completeness against the combined final size, so files are only partial when the complete payload genuinely exceeds the cap.
Useful? React with 👍 / 👎.
Module map cards built from names and declarations could describe an optional runtime bridge as development tooling or treat conditional/manual script operations as executed defaults. Subscription module initialization now supplies pinned, numbered implementation excerpts and independently reviews each candidate card against its actual referenced sources.
The input remains bounded to 40,000 UTF-8 bytes. Each offered file records its hash and complete/partial/unknown status, shares the remaining excerpt budget, and includes the whole file when it fits. Unlimited cards retain four declaration signatures per file; the legacy declaration-only prompt and 40-signature limit remain unchanged. Unlimited input identity records module_prompt_version3 so redrafts use a genuine new batch.
The existing independent Codex prose gate must answer yes to faithful, does_not_weaken and non_contradictory before admitting a card. Its source input focuses on the filtered entry-point/key-file references. Rejected or unavailable reviews retain the actual verdict, model, reasons and text hash, drop only that card and leave its module coverage unknown. Other navigation continues; feature and core-file coverage targets remain separately enforced. No automatic repair or additional formal depth recognition is introduced.
Validation: all 149 relevant tests pass on the final patch, including subscription compatibility, source packing, individual no/unsure/native/subscription-recheck failures, other-card continuation, true partial coverage and legacy behavior. Document citations and SPEC freshness pass. The WhatsApp and NFS modules fit complete source evidence; the larger root scripts module remains explicitly partial and cannot claim unshown execution. No native model calls or generated knowledge/checkpoint edits were performed.