Skip to content

ci(cc024+cc029): add test-usage-weekly + test-codex-dispatch jobs#57

Merged
screenleon merged 1 commit into
mainfrom
feat/cc024-cc029-ci-jobs
May 15, 2026
Merged

ci(cc024+cc029): add test-usage-weekly + test-codex-dispatch jobs#57
screenleon merged 1 commit into
mainfrom
feat/cc024-cc029-ci-jobs

Conversation

@screenleon
Copy link
Copy Markdown
Owner

Summary

Close CC-024 and CC-029 — add the two outstanding test scripts to .github/workflows/lint.yml so they run on every push to main and every pull request.

  • Append two new jobs (test-usage-weekly, test-codex-dispatch) after test-install, following the existing 6-job pattern exactly (ubuntu-latest, single actions/checkout@v6 step, single run step).
  • No new actions, no caching, no env vars — both scripts are fixture-driven with mktemp-isolated state and require only bash + jq + GNU coreutils (default on ubuntu-latest).
  • CC-029 prerequisite chore: claude-config tier-1 cleanup + agent lint + CI #2 ("confirm snapshot fixtures don't depend on $HOME absolute paths / external secrets") pre-checked during brief writing — satisfied as-is, no fixture work required.

Test plan

  • bash scripts/test-usage-weekly.sh → 20 passed / 0 failed (locally)
  • bash scripts/test-codex-dispatch.sh → 13 passed / 0 failed (locally)
  • yaml.safe_load lint with 8-jobs assertion → ok
  • Per-job shape grep → exactly one runs-on: ubuntu-latest, one actions/checkout@v6, one run: ./scripts/<name>.sh, no env block
  • git status --short shows only .github/workflows/lint.yml modified
  • CI green on this PR — verifies the new jobs actually run end-to-end in Actions

🤖 Generated with Claude Code

Append two new lint.yml jobs following the existing 6-job pattern
(ubuntu-latest, actions/checkout@v6, single run step). Both target
scripts pass locally (20/20 and 13/13) and are fixture-driven with
mktemp-isolated state — no fixture work needed.

Closes CC-024 and CC-029.

NOTE: not pushing yet — work paused to investigate hook-codex-bash-guard
agent_type leakage and main-thread release regression first.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@screenleon screenleon merged commit d96a34e into main May 15, 2026
8 checks passed
@screenleon screenleon deleted the feat/cc024-cc029-ci-jobs branch May 15, 2026 14:07
screenleon added a commit that referenced this pull request May 16, 2026
…/028/034 (#60)

Index row CC-029 was still 🔵 active even though PR #57 landed it
2026-05-15. Promote to ✅ closed and add Outcome + See pointers.

Backfill missing **See**: pr:#NN stubs for previously-closed entries
CC-027/CC-028/CC-034 that already pointed at PR #54/#55/#53 in their
Refs column but lacked the body-side See stub required by
pm/scripts/validate.sh E-CLOSURE-NO-SEE.

Pure data drift fix; no validator or runtime change. Remaining
baseline noise (CC-035 E-INDEX-MISMATCH, CC-038 E-AREA-ENUM +
E-REFS-PREFIX) is tracked separately and intentionally out of
scope here.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
screenleon added a commit that referenced this pull request May 16, 2026
CC-030 fix-round-3 tightens the **Outcome** fallback regex to
require YYYY-MM-DD immediately after the `**Outcome**: ` literal.
CC-029's Outcome line currently reads
"**Outcome**: PR #57 合併 2026-05-15; ..." — date is mid-sentence,
no longer satisfies the closure-date evidence under the tightened
rule.

Reorder to "**Outcome**: 2026-05-15 — PR #57 合併; ...", matching
the canonical shape used by CC-027/028/034 in PR #62.

Verified against the strengthened validator from feat/cc030: token
set returns to the pre-existing 3-token baseline (E-AREA-ENUM,
E-REFS-PREFIX, E-INDEX-MISMATCH).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
screenleon added a commit that referenced this pull request May 16, 2026
…n bidirectional) (#65)

* feat(cc030): validate.sh closure-date + CHANGELOG drift detection

Extend pm/scripts/validate.sh with two new structural checks:

- E-CLOSURE-DATE-MISMATCH: when index row is `✅ closed YYYY-MM-DD`
  (or `🚫 ...` dropped), require the body section to carry the same
  date — either as a heading marker (`## CC-XXX — title ✅ YYYY-MM-DD`)
  or as any YYYY-MM-DD token within the section when **Outcome**: is
  present. Catches the drift class where Index says closed but body
  has no closure metadata (or disagrees on date).

- E-CHANGELOG-DRIFT: optional second pass that runs when CHANGELOG.md
  is given as third positional arg or auto-detected as sibling of
  BACKLOG.md. For each pr:#NN token under `## [Unreleased]`, require
  some backlog Index row to reference that PR; symmetric direction
  (closed but unmentioned) intentionally out of scope.

CLI surface extended additively:
  validate.sh <BACKLOG.md> [DECISIONS.md] [CHANGELOG.md]
2-arg form unchanged; missing sibling CHANGELOG silently skips
drift pass; explicit nonexistent path returns exit 2 (matches
DECISIONS file behavior).

Fixtures added: bad-closure-date-mismatch/ and bad-changelog-drift/
with explicit want_token entries in run-tests.sh. Existing fixtures
unchanged; 13 passed / 0 failed. Repo BACKLOG.md continues to emit
only the pre-existing 3 token set (E-INDEX-MISMATCH, E-AREA-ENUM,
E-REFS-PREFIX) tracked separately.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(cc030): tighten CHANGELOG drift + closure-date extraction (gate r1)

PR-gate gate-20260516-195358 found two convergent issues:

- CHANGELOG drift only checked PR token presence in Refs, not status:
  `[Unreleased]` could reference an `🔵 active` row and silently pass.
  Strengthen rule so `pr:#NN` MUST map to at least one backlog row
  with status `closed`. Missing / active / deferred / dropped / done
  all emit E-CHANGELOG-DRIFT (Branches A–E from proactive sweep).
- Closure body date fallback scanned any YYYY-MM-DD in the section,
  including Source / Why / Note lines. Tighten to heading marker
  (`✅ YYYY-MM-DD` / `🚫 YYYY-MM-DD`) OR a date on a `**Outcome**:`
  line only.

New fixture bad-changelog-drift-active-ref/ exercises Branch C
(Unreleased ref → active row). Existing bad-changelog-drift
remains the canonical Branch A (missing ref) case. Existing
bad-closure-date-mismatch confirmed still emits exactly
E-CLOSURE-DATE-MISMATCH under the tightened extraction scope.

run-tests.sh: 14 passed / 0 failed.

The strengthened closure-date rule exposes pre-existing data drift
on the live BACKLOG (CC-027 / CC-028 / CC-034 Outcome lines lack
YYYY-MM-DD; previously masked by Source-line dates). That data
drift is intentionally left for a separate data-prep PR before
merging this branch, per the established split between data and
validator-code changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(cc030): CHANGELOG auto-detect on legacy 2-arg + multi-arg tests (gate r2)

PR-gate r2 (gate-20260516-201444) found a real regression: callers
using the legacy `validate.sh BACKLOG.md DECISIONS.md` form silently
lost CHANGELOG drift detection. Root cause was line 41's overly
strict guard `[ -z decisions ] && [ -z changelog ]` — sibling
CHANGELOG auto-detect only ran when BOTH optional args were empty.

Fix: condition relaxed to `[ -z changelog ]` only. DECISIONS arg
presence no longer suppresses CHANGELOG auto-detection.

Branch sweep across all CLI invocation forms (CLI-1..CLI-6):
- 1 arg, auto-detect: unchanged (works)
- 2 args (DECISIONS), auto-detect sibling: NOW works
- 3 args explicit DECISIONS+CHANGELOG: unchanged (works)
- 3 args empty DECISIONS + explicit CHANGELOG: unchanged (works)
- 3 args explicit but nonexistent CHANGELOG: unchanged (exit 2)
- 2 args, sibling CHANGELOG missing: unchanged (silent skip)

Test coverage:
- T1: explicit 3-arg drift via run_validate_case_multi helper
- T2: legacy 2-arg + sibling CHANGELOG drift (regression-fix case)
- T3: explicit nonexistent CHANGELOG -> exit 2 + E-SCHEMA-HEADER

run-tests.sh: 17 passed / 0 failed. New minimal DECISIONS.md
fixture under bad-changelog-drift/ enables T2 without disturbing
the existing single-arg case.

Architect-medium (status normalize dedup) and architect-low
(flag-based CLI) deferred to follow-up backlog entries.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(cc030): tighten heading marker + Outcome regex; happy-path fixture (gate r3)

PR-gate r3 (gate-20260516-202620) found two regression boundaries:

- Body-marker date capture in note_body_closure_date silently
  truncated trailing junk: `## CC-X ✅ 2026-05-15 garbage` was
  accepted as exact date. Restore strict shape: heading marker
  must terminate after the 10-char date (only trailing whitespace
  permitted). Trailing non-whitespace content emits E-DATE-FORMAT.
- Outcome-line fallback scanned for any YYYY-MM-DD anywhere in
  the line; mid-sentence dates accidentally satisfied closure
  evidence. Tighten regex to require the date IMMEDIATELY after
  the literal `**Outcome**: ` prefix. Mid-line dates no longer
  count as closure evidence — they must be in the canonical
  position or in the heading marker.

Coverage gaps closed:
- good-changelog-closed-ref/: [Unreleased] referencing a closed
  backlog PR exits 0 cleanly (CL-B happy path).
- bad-closure-date-trailing-junk/: BD-3 boundary -> E-DATE-FORMAT.
- bad-outcome-date-misplaced/: BD-7 boundary
  -> E-CLOSURE-DATE-MISMATCH.

run-tests.sh: 20 passed / 0 failed.

The tightened Outcome regex newly flags CC-029's Outcome line
("**Outcome**: PR #57 合併 2026-05-15;" — date is not at the
prefix position). That data drift is intentionally left for a
separate data-prep PR before merging this branch.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(cc030): cross-repo PR refs + dropped-row fixture + dead code purge (gate r4)

PR-gate r4 (gate-20260516-204121) flagged two convergent gaps and
one cleanup:

- F1 (critic+qa high): schema permits pr:owner/repo#NNN (schema.md:96)
  but validator regex only matched pr:#NNN. Cross-repo refs in
  [Unreleased] silently passed when active row referenced them.
  Fix: unify PR-token regex
  `pr:([A-Za-z0-9._-]+/[A-Za-z0-9._-]+)?#[0-9]+` across both passes
  (backlog refs collection + [Unreleased] scan). Cross-repo and
  simple tokens kept as DISTINCT keys (pr:#100 != pr:owner/repo#100).
- F2 (qa medium): bad-closure-date-dropped-mismatch/ fixture covers
  the 🚫 dropped branch of the closure-date check.
- F3 (critic low): removed unused date_token() helper added in
  fix-r3.

Schema audit table (delivered in dispatch final message) confirms
no further divergence between schema.md and validator behavior:
Refs prefixes, status enum, closure markers all aligned. Audit
recorded for follow-up reviewers.

Branch sweep XR-1..XR-6 (cross-repo refs) verified:
- XR-2 (cross-repo closed-row match) PASS
- XR-3 (no matching row) drift
- XR-4 (cross-repo active row) drift
- XR-5 (mixed simple+cross) drift per token
- XR-6 (malformed pr:#owner/repo) ignored gracefully

run-tests.sh: 22 passed / 0 failed (20 prior + 2 new).
Repo BACKLOG.md validation token set unchanged (3 pre-existing).

Deferred to follow-up backlog (architect-medium status-normalize
dedup; qa-low docstring style) will be recorded by main-thread.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(cc030): add positive fixture for Outcome-date fallback (gate r5)

PR-gate r5 (gate-20260516-205441) — only qa-tester blocked: the
Outcome-date fallback branch had negative coverage
(bad-outcome-date-misplaced rejects mid-sentence dates) but no
positive fixture proving the canonical accepted shape.

Add good-closure-outcome-date/ — closed row with no heading
marker, Outcome line "**Outcome**: 2026-05-01 — ..." date right
after the prefix → exit 0, empty stderr.

Critic + qa low (docstring style) and critic + arch low
(run_validate_case_multi duplicates run_validate_case) deferred
to follow-up backlog; will be recorded by main-thread.

run-tests.sh: 23 passed / 0 failed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
screenleon added a commit that referenced this pull request May 19, 2026
#57 (#99)

* chore(backlog): mark CC-024 closed — test-usage-weekly CI job shipped in PR #57

CC-024 was implemented in PR #57 (ci(cc024+cc029)) but the BACKLOG entry
was never updated. Sync index row to closed, stub the body, and archive
the full requirement + outcome in BACKLOG-ARCHIVE.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(archive): fix CC-024 insert order and update Last-archived date

Move CC-024 entry to numeric position (before CC-025) and update archive
header date to 2026-05-19 per gate advisory (critic, qa-tester).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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