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:34:
Allow classification items without a state — When importing a valid non-session tier item, this column rejects the snapshot because the existing contract makes
TierItem.stateoptional (pm-stack/aggregator/src/model.ts), and the decision item inpm-stack/aggregator/test/contract-corpus/v1/orchestration.jsonactually omits it. There is no default or normalization specified in the new writer contract, and an empty-string fallback also fails this check. Make the column nullable for absent state, or explicitly define a compatible normalization before fixing the schema contract.
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 "4533363913" — 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 contract mismatch).
Still live on the PR head (verified 2026-11-11, two gh api reads at ref 2532da6)
- Migration, line 34:
state text NOT NULL CHECK (btrim(state) <> ''). pm-stack/aggregator/src/model.tson the head:TierItem.state?: string(line ~596, "AttentionState for sessions; a free label otherwise") — optional.pm-stack/aggregator/test/contract-corpus/v1/orchestration.jsonon the head: theneedsDrewdecision item (example-owner/example-repo#812, kind "decision") has nostatefield at all, so importing the corpus snapshot would be rejected by the column as written.
Acceptance criteria
- The schema contract accepts valid tier items without a state — the column is nullable for absent state, or a compatible normalization is explicitly defined in the writer contract and applied before insert — or the finding is resolved by a documented decision on this issue.
- The contract corpus (including the state-less decision item) imports cleanly under the final schema.
Activity
developing-today commentedon Nov 12, 2026
CODE-2673
dezren39 commentedon Nov 12, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 12, 2026
🤖 Agent note · triaged (inline) + picked up task 15081 for issue #8856
1 remaining item
fix(pm-stack): orch_items.state is nullable — TierItem.state is optio…
dezren39 commentedon Nov 12, 2026
🤖 Agent note · fixed — task 15081 (issue #8856)
orch_items.stateis now nullable withCHECK (state IS NULL OR btrim(state) <> ''): absent state (a valid TierItem may omit it) imports as NULL; a present-but-blank state is still rejected. Verified all three cited reads live on the branch before editing (migration NOT NULL, model.tsstate?: string, corpus decision item with no state key).pm-stack/shared-schema/test-orchestration-migration.shgained a state-less insert mirroring the contract-corpus decision item plus a blank-state rejection case; the full harness passes on disposable PostgreSQL 16 ("ok - state-less contract-corpus item imports (state is NULL)", "ok - rejected item with a blank state", all pre-existing checks green).dezren39 commentedon Nov 12, 2026
🤖 Agent note · already done — task 15085 (issue #8856)
fix(pm-stack): orch_items.state is nullable — TierItem.state is optio…
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): orch_items.state is now nullable with a non-blank-when-present CHECK. Verified on the merged head by pm-stack/shared-schema/test-orchestration-migration.sh on disposable PostgreSQL 16: state-less contract-corpus item imports with NULL state; blank state still rejected. — repo-worker-code, lane any-b, task 17224