singularity-forge/src/resources
Mikael Hugo ca5890df2e Auto-hardening: 10 structural fixes for reliable multi-day autonomous operation
Implements all fixes from the auto-hardening audit plan:

P1-A: Per-phase timeout watchdog — withPhaseTimeout() wraps preDispatch/dispatch/finalize;
      on timeout emits warning, increments consecutiveFinalizeTimeouts, continues loop.
      Configurable via preferences.auto_supervisor.phase_timeout_minutes (default: 10).

P1-B: Verified already wired (MAX_COOLDOWN_RETRIES → stopAuto+break). No change needed.

P1-C: Worker timeout in parallel orchestrator — kills workers running beyond
      parallel.worker_timeout_minutes (default: 120 min) in refreshWorkerStatuses().

P2-A: Memory injection into dispatch prompts — buildMemoriesBlock() appended to
      plan-milestone inlined[] context and added as memoriesSection in execute-task.

P2-B: Memory extraction retry — one 2s-delayed retry in the catch block of
      extractMemoriesFromUnit(); second failure is silently swallowed (non-fatal).

P3-A: Partial verification state in DB — verificationStatus ("all_pass"/"partial"/"all_fail")
      derived from verificationEvidence.exitCode array and stored in new tasks column.
      New dispatch rule blocks next task when prior task has all_fail status.

P3-B: Gate omission rationale enforcement — minOmissionWords added to GateDefinition
      (Q3=20, Q5=15, Q6=10, Q7=15). Short rationale upgrades verdict "omitted" → "flag".

P4-A: Doctor issues → reassess escalation — pre-dispatch health check in loop.ts detects
      issues referencing slice IDs and queues reassess-roadmap sidecar instead of pausing.

P4-B: File overlap preemption — analyzeParallelEligibility() sets eligible:false when
      the overlapping milestone is currently running (not just eligible/queued).

P5-A: Deferred requirement tracking — parseDeferredRequirements() added to files.ts;
      completing-milestone rule warns (via logWarning) when deferred reqs targeting
      the milestone were not validated before completion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 16:26:25 +02:00
..
agents refactor: rebrand gsd_ tool names and references to sf_ namespace 2026-04-15 15:51:38 +02:00
extensions Auto-hardening: 10 structural fixes for reliable multi-day autonomous operation 2026-04-18 16:26:25 +02:00
skills refactor(native): rename gsd_parser.rs to forge_parser.rs 2026-04-15 14:58:21 +02:00
SF-WORKFLOW.md refactor(native): rename gsd_parser.rs to forge_parser.rs 2026-04-15 14:58:21 +02:00