Skip to content

[codex] Harden local CLI task lifecycle quality#78

Merged
abpai merged 5 commits into
mainfrom
codex/task-lifecycle-quality
Jun 24, 2026
Merged

[codex] Harden local CLI task lifecycle quality#78
abpai merged 5 commits into
mainfrom
codex/task-lifecycle-quality

Conversation

@abpai

@abpai abpai commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix local SQLite task creation so KANBAN_DEFAULT_TASK_COLUMN is honored when task add omits -c, while explicit -c still wins.
  • Document both supported task label flag spellings in README and public CLI help.
  • Add the canonical quality ledger workbook plus a Bun regression matrix for the local CLI single-Task lifecycle slice.

Evidence

  • Reviewer approved Phase 4 remediation and Phase 5 regression.
  • Canonical workbook: outputs/019ef3d9-f711-7b83-aabe-b85f2369a785/agent-kanban-quality-ledger.xlsx.
  • Focused matrix: bun test src/__tests__/cli-task-lifecycle-matrix.test.ts -> 64 pass, 0 fail, 631 assertions.
  • Full post-commit suite on origin/main branch base: bun test -> 559 pass, 27 skip, 0 fail, 1935 assertions.
  • bun run typecheck -> pass.
  • bun run ui:typecheck -> pass.
  • bunx eslint . --ignore-pattern '.claude/**' --ignore-pattern 'outputs/**' -> pass.
  • bunx eslint outputs/019ef3d9-f711-7b83-aabe-b85f2369a785/build-quality-ledger.mjs -> pass.

Known limitation

bun run check still fails because repo lint scans generated/tooling paths under .claude/worktrees/serve-api-webhooks-qa/**, including dist/index.js and worktree TS files outside the project service. This is recorded in the ledger and is outside this PR diff.

abpai added 4 commits June 23, 2026 08:44
…ger artifacts

Review fixups on top of the task-lifecycle-quality work (production code in
31a739b verified correct and left unchanged).

- The cli() helper spawns the CLI with the ambient process.env, so a host/CI
  FORCE_COLOR (e.g. FORCE_COLOR=3) made Bun wrap the error JSON on stderr in ANSI
  codes, breaking the JSON.parse(result.stderr) assertions in TC-010-04/05. Pin
  NO_COLOR=1 / FORCE_COLOR=0 in cliEnv() so stderr stays plain regardless of the
  host. Verified: the matrix file now passes 64/64 under FORCE_COLOR=3 (was 62/2).
- Drop ~2 MB of committed generated artifacts under outputs/019ef3d9-…/ (3 PNG
  previews, an .xlsx, its .ndjson dump, the generator .mjs) and gitignore
  outputs/ so agent-session ledger material can't be re-committed.

Full suite 559 pass / 27 skip / 0 fail under FORCE_COLOR=3; bun run check clean.

Claude-Session: https://claude.ai/code/session_01LQjR5poSV2M3nxt8h5hNad
@abpai

abpai commented Jun 23, 2026

Copy link
Copy Markdown
Owner Author

Independent verification + small reviewer fixups pushed as 7c73db7 (fast-forward, no rebase/force).

Production code — verified correct, unchanged. The default-task-column fix (31a739b) correctly plumbs config.defaultTaskColumn through factory → LocalProvider → SqliteLocalStore.createTask (column: input.column ?? this.defaultTaskColumn), bringing the SQLite store to parity with Postgres. Verified end-to-end: configured default honored, explicit -c still overrides, empty/unset → backlog. No regressions.

Two fixups (in 7c73db7):

  1. Test env-robustness. cli() spawned the CLI with the ambient process.env, so a host/CI FORCE_COLOR (e.g. =3) made Bun wrap the error JSON on stderr in ANSI codes, breaking the JSON.parse(result.stderr) assertions in TC-010-04/05. Pinned NO_COLOR=1 / FORCE_COLOR=0 in cliEnv(). The matrix file now passes 64/64 under FORCE_COLOR=3 (was 62/2).
  2. Dropped ~2 MB of generated artifacts under outputs/019ef3d9-…/ (3 PNG previews, an .xlsx, its .ndjson dump, the generator .mjs) and added outputs/ to .gitignore.

Verification: full suite 559 pass / 27 skip / 0 fail (under FORCE_COLOR=3); bun run check clean. Branch is conflict-free with main (zero file overlap with #79/#80), so it's squash-mergeable as-is — no rebase required.

Codex review of PR #78 caught a remaining parity gap. addTask() resolved the
no-explicit-column case via resolveColumn(db, 'backlog'), which throws
COLUMN_NOT_FOUND when KANBAN_DEFAULT_COLUMNS omits "backlog" and
KANBAN_DEFAULT_TASK_COLUMN is unset. The Postgres local provider instead falls
back backlog -> first column by position, so e.g.
`KANBAN_DEFAULT_COLUMNS=Todo,Doing,Done kanban task add X` succeeds on Postgres
(lands in Todo) but failed on SQLite with COLUMN_NOT_FOUND.

Add resolveDefaultColumn() mirroring the Postgres resolveDefaultTaskColumn
fallback (backlog, else first column by position, else "No columns are
configured") and use it for the default path. A configured
KANBAN_DEFAULT_TASK_COLUMN still flows through as the explicit column, and an
explicit --column still overrides.

+1 regression test (TC-002-09) for the custom-columns-without-backlog parity
case. Full suite 560 pass / 27 skip / 0 fail; bun run check (lint + typecheck)
clean.

Claude-Session: https://claude.ai/code/session_01X9j5Rs6kXK8BuHguhy3x33
@abpai abpai marked this pull request as ready for review June 24, 2026 14:10
@abpai abpai merged commit c73ddcb into main Jun 24, 2026
1 check passed
@abpai abpai deleted the codex/task-lifecycle-quality branch June 24, 2026 14:11
abpai added a commit that referenced this pull request Jun 24, 2026
The serve-hardening and CLI work since v0.7.0 (PRs #76, #77, #78, #79) merged
without changesets, so the Release workflow had nothing to consume and the
package is still published at 0.7.0. Add the missing changesets so the next
release captures this work.

- serve-api-webhook-hardening (patch): #76 - envelope webhook-route errors plus
  tunnel / Postgres-receipt / broadcast / base-path fixes (10 defects).
- webhook-secret-fail-open (patch): #77 - single WEBHOOK_SECRET_ENV source of
  truth for the tunnel gate + stricter KANBAN_SYNC_INTERVAL_MS parsing.
- honor-default-task-column (patch): #78 - SQLite createTask honors the
  configured default task column, with first-column fallback parity with Postgres.
- strict-jira-board-id (minor): #79 - a malformed JIRA_BOARD_ID now throws
  INVALID_CONFIG instead of being silently misparsed (behavior change).

Net bump: minor -> 0.8.0. #80 (pure internal refactor) and the README link fix
are intentionally omitted as they have no user-facing change.

Claude-Session: https://claude.ai/code/session_01X9j5Rs6kXK8BuHguhy3x33
@github-actions github-actions Bot mentioned this pull request Jun 24, 2026
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