Skip to content

Parallelize subscription foundation extraction with bound native approvals - #305

Merged
tzhouam merged 2 commits into
mainfrom
fix/kb-foundation-concurrency-20261006
Oct 5, 2026
Merged

tzhouam merged 2 commits into
mainfrom
fix/kb-foundation-concurrency-20261006

Conversation

@tzhouam

@tzhouam tzhouam commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

New discovery catalogs can add hundreds of features, while foundation extraction previously ran one draft and six section judgments at a time. Explicit knowledge --unlimited-subscription now runs up to 13 isolated owner/feature workers, with one coordinator checkpointing real native approvals and assembling approved sections in deterministic order. Finite-budget runs keep the existing serial flow and all six independent section criteria remain unchanged.

New canonical features read complete pinned source ranges from the verified full discovery archive, including related frontend/backend supplements. Citations must fit actual shown intervals. Resume verifies exact generator and judge prompts, sections, evidence, model configuration and complete native archives; a failed fresh proof remains unknown without discarding other approved facets. Original covered pages are reused. Native Zcode starts share a default five-second pacing interval.

Validation: 100 relevant tests passed, covering the shared concurrency ceiling, accounting drain, deterministic/shared-page assembly, individual failures, native and input tampering, next-day checkpoint recovery, compact report handoff, late/disjoint source ranges, supplemental chains, unchanged serial behavior and subscription prechecks. A final 18-test focused run passed after the last source-pin binding guard. No native model calls were used for implementation or tests.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T18:32:13.336177Z 1f3b3ad PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1f3b3adfbb

ℹ️ 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".

Comment on lines +178 to +179
if owner.startswith("feature-"):
feature = next((f for f in stage.coverage_policy.features if "feature-" + f.id == owner), None)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Stop classifying feature jobs by owner-name prefix

When a legitimate routed source owner is named feature-*, the parallel validator misclassifies its owner job as a catalog-feature job. If no coverage policy exists, accessing stage.coverage_policy.features raises AttributeError and aborts the stage after the native calls; with a policy lacking the corresponding feature ID, all approved artifacts for that owner are discarded. Owner slugs permit this prefix, so feature jobs need an explicit job-kind binding rather than inference from their names.

Useful? React with 👍 / 👎.

reply = self.gateway.call_json(role, **kwargs)
self.last[role.name] = {"native_trace_id": reply.trace_id,
"native_reply_sha256": reply.reply_sha256,
"prompt_sha256": hashlib.sha256(kwargs["prompt"].encode()).hexdigest()}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Hash the same prompt representation that the archive stores

When source or documentation input contains a token-shaped secret or a configured secret value, TraceStore.put_blob redacts the archived prompt, but this receipt records the hash of the unredacted prompt. _validate_native later hashes the archived, redacted text, so every otherwise valid artifact from that job fails the prompt binding and is dropped as an unknown native approval. Bind against the archive's redacted representation, while still comparing it with the expected prompt under the same redaction.

Useful? React with 👍 / 👎.

@tzhouam
tzhouam merged commit 8455075 into main Oct 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant