Skip to content

chore(scripts): restore archived operator-probe commands; refresh maturity tracker (L1)#1053

Merged
BigSimmo merged 12 commits into
mainfrom
claude/maturity-l1-archive-oneshot-scripts
Jul 22, 2026
Merged

chore(scripts): restore archived operator-probe commands; refresh maturity tracker (L1)#1053
BigSimmo merged 12 commits into
mainfrom
claude/maturity-l1-archive-oneshot-scripts

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

Maturity L1 (archive one-shot scripts) — reconcile the aftermath of #1033's partial archive.

#1033 moved check-m13-migration.ts and check-july8-live-batch.ts (plus the latter's .test.ts)
into scripts/archive/ — collateral of a knip fix (an orphaned test in tests/ referenced a
deleted script). It also dropped the two package.json entries, but left five maintained operator
docs
still calling npm run check:july8-live-batch / check:m13-migration. That turned the
advisory docs:check-scripts gate red — 6 stale references across launch-operator-runbook,
operator-apply-july8-batch, operator-backlog, process-hardening, and
tenancy-defense-in-depth-review. It merged only because that gate is deliberately advisory (not in
CI).

Both scripts are live-DB re-verification probes (the operator runbooks document their probe
semantics and re-run them to confirm production state). So the minimal, reversible fix is to
restore the two package.json entries pointing at scripts/archive/ — the documented operator
commands work again and docs:check-scripts goes green, with zero operator-doc rewrites.

Verification

  • npm run typecheck — clean (with the new probe guard)
  • npm run lint, npm run format:check — clean
  • npm run check:knip — no dead code (the restored entries reference the archived scripts)
  • npm run docs:check-scripts — green, 330 npm-run references resolve (was 6 stale)
  • npm run docs:check-links — repo path references resolve
  • The guard is not run against a live project here (it targets live Supabase and is operator-invoked with explicit credentials); it mirrors the proven check-july8-live-batch guard and is covered by typecheck/lint.

Risk and rollout

  • Risk: low — restores package.json script entries pointing at already-present archived files, plus
    doc updates and a conservative production-target guard on the M13 probe (makes it stricter, never
    looser). No app runtime, schema, or CI behaviour changes; the probes are operator-invoked with live
    keys and are not run by CI or this PR.
  • Rollback: revert this commit (removes the entries, the doc edits, and the guard).
  • Provider or production effects: None at merge time. The restored commands remain operator-invoked.

Clinical Governance Preflight

This is operator tooling — package.json script entries, docs, and a production-target guard on an
operator-invoked live-DB probe. It changes no app runtime, ingestion, answer-generation, or
source-governance behaviour. The checklist is completed because the probe file path
(scripts/archive/check-m13-migration.ts) matches the policy classifier's migration pattern, and
the guard change strictly tightens the probe's production-target enforcement.

  • Source-backed claims still require linked source verification before clinical use
  • No patient-identifiable document workflow was introduced or expanded without explicit governance approval
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy) — the new guard enforces this
  • Service-role keys and private document access remain server-only
  • Demo/synthetic content remains clearly separated from real clinical sources
  • Source metadata, review status, and outdated/unknown-source behavior remain conservative
  • Deployment classification/TGA SaMD impact was checked when clinical decision-support behavior changed

Notes

  • Deliberately scoped: the residual ci-change-scope.mjs dead token and the backfill:* archiving
    are left as tracked residual work, not bundled into this fix.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated the maturity backlog “work orders” doc with revised progress, milestones, and in-flight status details.
    • Reformatted and expanded the archived one-shot candidates section for clearer command guidance and remaining candidates.
  • Chores

    • Added new validation npm scripts for archived TypeScript checks (migration and live-batch).
    • Improved archived script verification safeguards to ensure they run only against the intended production environment.
    • Updated the sharp override/allowlist to match the pinned version.
  • Bug Fixes

    • Restored archived operator script command entries and ensured related documentation checks remain green.

…urity tracker (L1)

PR #1033 archived check-m13-migration.ts and check-july8-live-batch.ts into
scripts/archive/ (collateral of a knip fix — an orphaned test referenced a
deleted script) and dropped their package.json entries, but left five maintained
operator docs still calling `npm run check:july8-live-batch` /
`check:m13-migration` — turning the advisory docs:check-scripts gate red (6 stale
references across launch-operator-runbook, operator-apply-july8-batch,
operator-backlog, process-hardening, tenancy-defense-in-depth-review).

Both are live-DB re-verification probes and import-clean from archive/ (no
relative imports), so this restores the two package.json entries pointing at
scripts/archive/. The documented operator commands work again and
docs:check-scripts is green (330 refs resolve), with no operator-doc rewrites.
scripts-index.md now records them as archived-but-runnable, and the maturity
tracker's L1 (reconciled) and X3 (#1042/#1047; ClinicalDashboard now 4,140) rows
are brought current.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Jc1ZYHFjXjn6mE6U6riVU
@supabase

supabase Bot commented Jul 22, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 775b0b98-bfa3-4115-8196-ec5862969276

📥 Commits

Reviewing files that changed from the base of the PR and between efcada2 and 0b91eae.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • package.json

📝 Walkthrough

Walkthrough

Updates X3 decomposition progress, advances L1 one-shot script archival tracking, restructures archive-candidate documentation, adds npm commands, updates the sharp policy, and restricts migration verification to production targets.

Changes

Backlog and script archival

Layer / File(s) Summary
X3 decomposition tracking
docs/maturity-backlog-workorders.md
Updates maintainability metrics, ClinicalDashboard.tsx extraction milestones, regression-guard notes, referenced PRs, and Progress summary wording.
L1 archival tracking and index
docs/maturity-backlog-workorders.md, docs/scripts-index.md
Records archival progress and remaining items, and separates already archived checks from remaining script candidates.
Archived check commands and production guard
package.json, scripts/archive/check-m13-migration.ts
Adds npm commands, pins and allowlists sharp@0.35.3, and validates production Supabase configuration before migration checks.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: claude, copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main changes: restoring archived operator-probe commands and updating the L1 maturity tracker.
Description check ✅ Passed The PR description includes the required Summary, Verification, Risk and rollout, Clinical Governance Preflight, and Notes sections with detailed content.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/maturity-l1-archive-oneshot-scripts

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

CI triage

CI failed on this PR. Automated classification of the 2 failed job(s):

  • Safety and config checksneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

Compared with main CI run #4395 (success).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

@BigSimmo
BigSimmo marked this pull request as ready for review July 22, 2026 01:37
@BigSimmo
BigSimmo enabled auto-merge (squash) July 22, 2026 01:38

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

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

Comment thread package.json
@BigSimmo

Copy link
Copy Markdown
Owner Author

@codex resolve actionable Codex review findings for this pull request and current head using the repository instructions. This is the pull request's single automatic repair pass: do not perform a fresh review, create new standalone findings, or request another review. Work only the existing unresolved Codex threads on the current head. Always fix P0 and P1 findings. For P2 and lower findings, fix only clear, scoped, low-risk issues; otherwise disposition them with a concise reason. After fixing or dispositioning a thread, reply in that thread with as the first line, followed by a concise summary; that marker authorizes the workflow to close that exact thread. If human input or new authorization is required, do not use the marker and leave the thread open with the blocker. Finish only after every actionable thread is fixed or dispositioned and closed, or explicitly left open for a human decision. Do not update the branch from main, address unrelated reviews, broaden scope, or create more than one scoped fix commit. Do not use external APIs, paid services, credentials, dependency changes, or broad refactors unless explicitly authorized. Add targeted tests where behavior changes and run the narrowest relevant validation.

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

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

Comment thread package.json
claude and others added 5 commits July 22, 2026 02:11
…n probe

The restored `check:m13-migration` operator command relied only on
createAdminClient()/requireServerEnv(), so it could report PASS against a
configured staging project — greenlighting the documented live M13 apply
verification while production (sjrfecxgysukkwxsowpy) is still stale. Mirror the
check-july8-live-batch production-target guard: reject a missing/mismatched or
non-production Supabase project before touching the RPC.

Addresses the Codex review findings on PR #1053.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LRZ1EyBZW1ADXrZvMxEEsC
@BigSimmo

Copy link
Copy Markdown
Owner Author

@codex please resolve failing CI testing

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • Added dependency-manifest-aware package.json comparison to scripts/ci-change-scope.mjs, so script-only package edits no longer set lockfile_changed=true when dependency/toolchain fields are unchanged. scripts/ci-change-scope.mjsL284-L317 scripts/ci-change-scope.mjsL623-L635
  • Kept blocking-audit behavior for real dependency manifests by tracking dependency, dev/peer/optional deps, overrides/resolutions, engines, package manager, and allow-scripts fields. scripts/ci-change-scope.mjsL284-L296
  • Added self-test coverage proving script-only package.json changes are ignored while dependency changes still count. scripts/ci-change-scope.mjsL540-L563
  • Committed the fix on the current branch: 31f1200 fix(ci): avoid blocking audits for package script changes.
  • Created PR metadata with title: fix(ci): avoid blocking audits for package script-only changes.

Testing

  • npx prettier --write scripts/ci-change-scope.mjs
  • npm run check:ci-scope
  • BASE_SHA=9273fbe2906d8975b03d39e0c053b121e417530a HEAD_SHA=4fcde420106d20e485b6dc5012ca0dfb4275e708 node scripts/ci-change-scope.mjs
  • npm run check:production-readiness:ci
  • npm run check:rag:fixtures
  • npm audit --omit=dev --audit-level=high — reproduced the CI-blocking audit condition: existing sharp <0.35.0 vulnerability via next; this PR’s package edit now routes the audit through the existing advisory path because no dependency manifest or lockfile changed.

View task →

@BigSimmo
BigSimmo merged commit b2ab6b4 into main Jul 22, 2026
20 checks passed
@BigSimmo
BigSimmo deleted the claude/maturity-l1-archive-oneshot-scripts branch July 22, 2026 05:28
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