Skip to content

Add selected candidate handoff preflight#140

Merged
SoundBlaster merged 1 commit into
mainfrom
codex/selected-candidate-handoff-preflight
Jun 13, 2026
Merged

Add selected candidate handoff preflight#140
SoundBlaster merged 1 commit into
mainfrom
codex/selected-candidate-handoff-preflight

Conversation

@SoundBlaster

Copy link
Copy Markdown
Member

Motivation

SpecHarvester P32-T5 now emits refreshed selected candidate handoff evidence for the limited popular-library corpus. SpecPM needs a consumer-side gate before maintainers use that producer evidence for intake review.

Goals

  • Add a read-only selected candidate handoff preflight.
  • Validate refreshed and legacy SpecHarvester handoff artifacts.
  • Keep passing preflight as review evidence only, not registry acceptance.

Changes

  • Added specpm producer-bundle preflight-selected-candidate-handoff.
  • Added SpecPMSelectedCandidateHandoffPreflightReport.
  • Validates identity, schema, authority, selected/deferred counts, preview-only posture, producer preflight/viewer status, evidence digests, source fixture digests, and cupertino.core deferral.
  • Accepts both refreshed P32 handoff artifacts and legacy selected handoff proposals.
  • Documented the policy in specs, DocC, roadmap/workplan, CLI reference, multi-package intake, producer bundle policy, and self-spec.
  • Added regression tests for refreshed success, legacy compatibility, CLI JSON, no-root warning, authority drift, candidate drift, source digest drift, and docs coverage.

Validation

  • python3 -m py_compile src/specpm/producer_bundle.py src/specpm/cli.py
  • PYTHONPATH=src pytest tests/test_core.py -q -k 'selected_candidate_handoff_preflight'
  • PYTHONPATH=src pytest -q
  • PYTHONPATH=src ruff check .
  • PYTHONPATH=src ruff format --check src tests
  • git diff --check
  • PYTHONPATH=src python3 -m specpm.cli validate . --json
  • make docs-build
  • make pages-smoke
  • make public-index-generate PUBLIC_INDEX_OUTPUT=/tmp/specpm-selected-handoff-preflight-public-index
  • PYTHONPATH=src python3 -m specpm.cli producer-bundle preflight-selected-candidate-handoff --body /Users/egor/Development/GitHub/0AL/SpecHarvester/tests/fixtures/refreshed_candidate_layer_selected_handoff/p32-t5-refreshed-candidate-layer-selected-handoff.example.json --root /Users/egor/Development/GitHub/0AL/SpecHarvester --json

Real P32-T5 handoff result: passed, 8 selected candidates, 1 deferred candidate, 3 source digests verified.

Docker note: make dev-reload && make dev-smoke was attempted earlier in the task, but Docker build stalled while loading metadata for docker.io/library/python:3.12-slim; no local specpm:dev image was available. Public index generation and Pages smoke passed.

Boundaries and Non-Goals

  • Does not accept packages.
  • Does not accept relations.
  • Does not seed baselines.
  • Does not remove preview_only.
  • Does not create a SpecPM pull request.
  • Does not publish registry metadata.
  • Does not run SpecHarvester or source repository code.

Notes

  • This closes the SpecPM-side part of the technical debt found by the limited corpus run: selected producer evidence is now machine-checkable before maintainer intake.

Copilot AI review requested due to automatic review settings June 13, 2026 19:52

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@SoundBlaster SoundBlaster merged commit 8a5ce3d into main Jun 13, 2026
8 checks passed
@SoundBlaster SoundBlaster deleted the codex/selected-candidate-handoff-preflight branch June 13, 2026 19:54

@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: f96e5a45ad

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

field="deferredCandidates",
)
)
overlap = sorted(set(selected_ids) & set(deferred_ids))

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 Filter missing IDs before overlap checks

When a malformed handoff has both a selected and a deferred candidate without id/packageId, candidate_id() returns None, so this intersection includes None; the later ', '.join(overlap) then raises TypeError (and mixed None/string overlaps can also fail in sorted). That makes preflight-selected-candidate-handoff crash instead of returning the already-collected missing-ID validation errors.

Useful? React with 👍 / 👎.

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.

2 participants