Repository navigation
Description
Finding (unaddressed PR review comment)
Codex P2 on open PR #8458 — comment #8458 (comment) by chatgpt-codex-connector[bot], 2026-11-11T02:49:13Z, at pm-stack/shared-schema/migrations/20261111_0001_orchestration_state.up.sql:25:
Reject missing JSON identity fields in the checks — If a writer supplies a document missing
runIdorversion, these expressions can evaluate to SQL NULL, which PostgreSQL accepts in a CHECK constraint. For example,document = '{}'passes despite having neither required identity field. The item identity check below has the same problem foritem = '{}'. This permits rows that violate the advertised identity contract and, for run documents, cannot be served as valid orchestration exports. Require the extracted identities to be non-null or require the complete comparison to beIS TRUE, and cover missing and JSON-null fields in the rejection probes.
Grace rule: the PR is still open; the comment is more than 24 hours old (2026-11-11T02:49:13Z) with no fix or reply since, so it counts as unaddressed.
No-response evidence
- Fresh re-read (2026-11-11, this run): the comment has no replies; no conversation comment addresses it; the PR head is unchanged at the reviewed commit
2532da6c82. - GraphQL
reviewThreadscheck: the thread is unresolved. - Searched open and closed issues for "8458" and "4533363924" — no existing issue covers this finding (issue pm stack → Supabase phase 1 (#3142): orchestration state into Supabase tables, orchestration.json becomes a generated export #5005 is the parent work item the PR implements; it does not cover this check bypass).
Still live on the PR head (verified 2026-11-11, two gh api reads at ref 2532da6)
Migration on the head:
- Lines 21–25:
CONSTRAINT orch_runs_document_identity_check CHECK (document ->> 'runId' = run_id AND document ->> 'version' ~ '^[0-9]+$' AND (document ->> 'version')::integer = document_version)— withdocument = '{}', every extracted value is SQL NULL, the conjunction is NULL, and PostgreSQL accepts the row. - Line 45:
CONSTRAINT orch_items_document_identity_check CHECK (item ->> 'id' = id)— the same NULL pass foritem = '{}'.
Acceptance criteria
- The identity checks reject documents/items missing
runId,version, orid(including JSON-null fields) — e.g. extracted identities are required non-null or the comparison is requiredIS TRUE— or the finding is resolved by a documented decision on this issue. - Rejection probes cover the missing-field and JSON-null cases for both tables.
Activity
developing-today commentedon Nov 12, 2026
CODE-2674
dezren39 commentedon Nov 12, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 12, 2026
🤖 Agent note · picked up
19 remaining items
fix(pm-stack): orchestration identity CHECKs reject missing/JSON-null…
dezren39 commentedon Nov 12, 2026
🤖 Agent note · done (fix landed on PR #8458)
Task 15082 complete. The Codex finding is fixed on PR #8458's branch (queue/14783-5005-orchestration-schema) in commit c278f24: both identity CHECKs in pm-stack/shared-schema/migrations/20261111_0001_orchestration_state.up.sql are now required IS TRUE, so a document/item whose runId, version, or id is missing or JSON null extracts SQL NULL, the comparison is not true, and the row is rejected. Oracle: pm-stack/shared-schema/test-orchestration-migration.sh on disposable PostgreSQL 16 — reproduced first (a run document with no identity fields was accepted), then after the fix all probes pass, including 5 new rejection probes (run document '{}', JSON-null runId, JSON-null version, item '{}', JSON-null item id) plus every pre-existing probe and the down-migration checks. Per packet scope, the source PR review thread was not replied to or resolved. This issue stays OPEN until PR #8458 merges; PR checks for the new head were QUEUED at completion time.
dezren39 commentedon Nov 12, 2026
🤖 Agent note · done (already done)
Task 15090 is the auto follow-on (small_fix) of triage task 15082 for this issue. The fix it calls for was already implemented under task 15082 in this shift bundle: commit c278f24 on PR #8458's branch makes both orchestration identity CHECKs IS TRUE, with 5 new missing/JSON-null rejection probes in test-orchestration-migration.sh passing on disposable PostgreSQL 16 (after a reproduced failure on the pre-fix migration). PR #8458 head re-verified as c278f24 at this claim. Completing task 15090 as already_done; no duplicate work. This issue closes when PR #8458 merges.
fix(pm-stack): orchestration identity CHECKs reject missing/JSON-null…
pm-stack: orchestration state schema contract (#5005 phase 1, P1 vett…
dezren39 commentedon Nov 14, 2026
Fixed by PR #8458 (squash-merged 8b42925, 2026-11-14): both orchestration identity CHECKs now require IS TRUE, so missing/JSON-null runId/version/id are rejected. Verified on the merged head by pm-stack/shared-schema/test-orchestration-migration.sh on disposable PostgreSQL 16: rejection probes pass for no-identity-fields, JSON-null runId, JSON-null version, item with no identity field, and item with JSON-null id. — repo-worker-code, lane any-b, task 17224