Skip to content

test: guard screened discard universe counts#348

Merged
Stahl-G merged 1 commit into
mainfrom
codex/screened-discard-universe-regression
Jul 2, 2026
Merged

test: guard screened discard universe counts#348
Stahl-G merged 1 commit into
mainfrom
codex/screened-discard-universe-regression

Conversation

@Stahl-G

@Stahl-G Stahl-G commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • add artifact-registry cross-validation between candidate_claims.json and object-shaped screened_candidates.json when screened total_candidates is declared
  • reject screened candidates that internally look complete but declare a smaller universe than candidate_claims.json
  • add positive and negative runtime-state regressions for the candidate/screened discard audit boundary

Boundary

  • does not change stage order, topology mode, artifact names, Claim Ledger freeze, gates, or delivery semantics
  • legacy list-shaped screened candidates and object-shaped screened artifacts without declared total remain compatible

Validation

  • python3 -m pytest -q tests/test_runtime_state.py -k "screened_candidates or default_topology_scout_completion"
  • python3 -m pytest -q tests/test_runtime_state.py tests/test_materiality_selection.py tests/test_quality_gates_commands.py -k "screened_candidates or materiality or coverage_omission"
  • python3 -m pytest -q
  • python3 scripts/check_release_consistency.py --no-tag
  • python3 scripts/check_product_baseline.py
  • python3 scripts/check_version_consistency.py
  • PYTHONPATH=src python3 scripts/check_capabilities.py
  • python3 -m compileall -q src tests scripts
  • git diff --check

@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: 29d7a9840f

ℹ️ 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 +1103 to +1107
_apply_candidate_screening_cross_validation(
workspace=workspace,
artifacts=artifacts,
records=records,
)

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 Block completion on screened universe mismatches

When Scout/Screener writes an object-shaped screened_candidates.json whose declared total is smaller than candidate_claims.json, this new check only runs while building the artifact registry; the stage completion preflight still calls _validate_artifact directly via _completion_artifact_gate_reasons / _topology_satisfaction_required_reasons, so default-topology stage-complete --stage scout can mark both Scout and Screener complete and only then record screened_candidates as invalid. That leaves the producer stage frozen as complete with an artifact this commit now knows is invalid, instead of rejecting the completion transaction before state is advanced.

Useful? React with 👍 / 👎.

@Stahl-G Stahl-G force-pushed the codex/screened-discard-universe-regression branch from 29d7a98 to 6afa0b1 Compare July 2, 2026 07:26

@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: 6afa0b19a4

ℹ️ 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 +609 to +610
if not missing_screened_id and screened_ids != candidate_ids:
return "candidate_universe_id_coverage_mismatch"

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 Reject screened entries missing candidate IDs

When candidate_claims.json has stable IDs, any screened entry without candidate_id now disables the final universe coverage comparison because missing_screened_id makes this branch skip the set check. For example, a file can declare total_candidates: 2, include one selected item with no ID plus an excluded CAND-001, and pass as valid even though CAND-002 disappeared and CAND-001 is effectively duplicated. Since the new gate is meant to guard the screened universe and the Scout/Screener contract requires stable candidate IDs, missing IDs in this path should be invalid rather than bypassing coverage.

Useful? React with 👍 / 👎.

@Stahl-G Stahl-G merged commit 02bf015 into main Jul 2, 2026
13 checks passed
@Stahl-G Stahl-G deleted the codex/screened-discard-universe-regression branch July 2, 2026 07:33
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