fix(sign-off): reset the agent-recorded Therapy Compass and DID sign-offs to needs_review

Merged
BI
1mo ago
+1470-5534

User description

Owner ruling (17 Oct 2026, 22:12 AWST): the sign-offs recorded in #3613 for 26 Therapy Compass records and the reworded DID "With/without possession form" specifier were not the owner's. They return to needs review until the owner signs each one with the interactive tool.

Evidence: all 27 were stamped reviewedBy: "Psych Sift" at the identical round time 2026-10-17T12:15:00.000Z, across two different tools. therapy:review and clinical:review both need an interactive terminal and stamp the real time with milliseconds.

Neither tool has a revoke mode, so this PR resets status in the data (owner-approved). No attestation is recorded or re-pinned:

  • src/data/therapies-source.json: 26 records → needs_review, checklist unticked, pre-sign-off reviewCompleteness, reviewedBy/reviewedAt/reviewedContentSha256 removed (wake-therapy's original nulls restored). The references #3613 added stay, so npm run therapy:review offers all 26.
  • data/specifiers-content.json: DID item → clinician-review-pending, changedSinceReview: true, reviewer/date/pin removed.
  • Regenerated: therapy index/assets, specifier search index, signable-therapy projection (from the tool's own walk queue), site-content manifest baseline and change owners, repo-awareness snapshot.
  • Tests now pin the restored counts (therapy 26 waiting, specifiers 515; signable now 29).
  • docs/decisions/2026-10-17-agent-recorded-therapy-and-did-sign-offs-reset.md records the ruling; the #3613 decision is marked superseded.
  • Ledger (sanctioned tooling only): cancels the pending done for #NZ4X41 (b1de924a) and queues an update saying 26 records await owner sign-off.

Local runs: typecheck, 86 therapy/specifier/sign-off/site-content test files (1099 tests), plus the ledger, decisions, organisation, index and snapshot checks.


Summary by cubic

Resets the sign-offs recorded in #3613 for 26 Therapy Compass records and the reworded DID possession-form specifier to needs_review: none were the owner's, so each returns to the sign-off queue until the owner signs it with the interactive therapy:review/clinical:review tools.

  • The 26 therapies return to needs_review with unticked checklists and no reviewer, date, or content pin; the DID specifier returns to clinician-review-pending with changedSinceReview set.
  • Unsigned records fail closed: therapy and specifier clinical prose is withheld from site content and Clinical Ask answers, showing only name and category, until the owner signs them.
  • The therapy catalogue is regenerated with a new --revoke-previous flag so pre-deploy bundles fall back to the current alias instead of serving the revoked pre-reset generation, and the retired assets are dropped from the change-owner manifest so the change-scope check passes.
  • therapy:review writes the signable projection inside its transaction so a signed therapy leaves the owner's to-do list, and clinical:review clears changedSinceReview when it records a specifier signature.
  • Adds decision records for both rulings, cancels the pending #NZ4X41 done in the ledger, and queues an update for the owner to sign each record.

Summary by CodeRabbit

  • Clinical Review
    • Returned 26 therapy records and one diagnostic specifier to pending review. Their sign-offs and review details are no longer shown as complete.
    • Pending-review counts now reflect the updated records.
  • Clinical Information
    • Evidence and catalogue details for items without completed clinical review are limited to their name and category.
  • Sign-Offs
    • Updated the available sign-off queue to include records awaiting review.

CodeAnt-AI Description

Restore review status and withhold unsigned clinical guidance

What Changed

  • Returns 26 therapy records and the DID possession-form definition to review, so they no longer appear as signed off.
  • Keeps unsigned clinical details out of answer evidence and site-content indexing while leaving records searchable by name and category. Signed content becomes available again after review.
  • Prevents older catalogue versions from showing the revoked therapy approvals as current.

Impact

✅ Unsigned therapy text excluded from answers
✅ 26 therapy sign-offs returned to the owner queue
✅ Revoked approvals removed from older catalogue versions

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.