singularity-forge/src/resources/extensions/gsd/bootstrap
Jeremy dd08f501e5 fix(gsd): validate depth verification answer before unlocking write-gate
The tool_result handler called markDepthVerified() whenever
ask_user_questions returned any response with a depth_verification
question ID — without checking what the user actually selected.
Selecting "Not quite", "None of the above", or garbage input all
unlocked the gate.

- Extract isDepthConfirmationAnswer() into write-gate.ts with structural
  validation: cross-references selected answer against the question's
  defined options, only accepting an exact match of the first option
  (confirmation by convention). Rejects free-form "Other" text and
  decouples from any specific label substring.
- Harden block message with explicit anti-bypass language
- Add anti-bypass instructions to all three discuss prompts
- Add 8 new tests covering: structural validation, free-form bypass
  rejection, label-drift resilience, fallback behavior, edge cases

Closes #3749
2026-04-07 19:45:00 -05:00
..
agent-end-recovery.ts fix(gsd): extract real error from message content when errorMessage is useless 2026-04-06 18:22:02 -07:00
db-tools.ts Merge pull request #3557 from Tibsfox/fix/rethink-skip-slice-db-sync 2026-04-07 07:15:53 -05:00
dynamic-tools.ts fix: recognize U+2705 checkmark emoji as completion marker in prose roadmaps (#1897) 2026-04-05 07:44:08 -04:00
journal-tools.ts refactor(gsd): migrate all catch blocks to centralized workflow-logger 2026-04-04 13:42:55 -05:00
notify-interceptor.ts feat(gsd): persistent notification panel with TUI overlay, widget, and web API 2026-04-05 22:13:28 -05:00
provider-error-resume.ts fix(gsd): resume auto-mode after transient provider pause (#2822) 2026-03-27 14:50:40 -06:00
query-tools.ts fix(gsd): open DB on demand in gsd_milestone_status for non-auto sessions 2026-04-06 18:49:50 -07:00
register-extension.ts fix(gsd): four prompt/runtime fixes for completion and session stability 2026-04-06 19:47:38 -07:00
register-hooks.ts fix(gsd): validate depth verification answer before unlocking write-gate 2026-04-07 19:45:00 -05:00
register-shortcuts.ts fix(gsd): add backdrop dimming and viewport padding to notification overlay 2026-04-06 17:34:45 -05:00
sanitize-complete-milestone.ts fix(gsd): handle large markdown parameters in complete-milestone JSON parsing (#3316) 2026-04-05 01:04:38 -04:00
system-context.ts fix(gsd): add intent + phase guards to resume context fallback (#3615) 2026-04-06 12:14:36 -05:00
tool-call-loop-guard.ts fix(gsd): prevent duplicate ask_user_questions dispatches with per-turn dedup cache 2026-04-04 16:33:36 -05:00
write-gate.ts fix(gsd): validate depth verification answer before unlocking write-gate 2026-04-07 19:45:00 -05:00