singularity-forge/src
Tibsfox 2978bacb74 fix(gsd): reconcile stale slice rows and rebuild STATE.md before DB close (#3658)
* fix(gsd): reconcile stale slice rows and rebuild STATE.md before DB close

Two coupled defects caused auto-mode split-brain where dispatch falsely
reported "No slice eligible" while STATE.md showed executable work:

1. deriveStateFromDb() reconciled missing slice rows but not stale
   existing ones. A slice with status "pending" in the DB but a SUMMARY
   file on disk was never repaired, permanently blocking downstream
   slices. Added slice-level stale reconciliation matching the existing
   task-level pattern.

2. stopAuto() closed the DB before rebuilding STATE.md, forcing
   deriveState() into filesystem fallback mode. Moved rebuildState()
   before closeDatabase() so stop-time STATE.md uses the same
   authoritative DB backend as dispatch.

Fixes #3599

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

* test: add regression test for stale slice row reconciliation

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

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 08:17:06 -04:00
..
resources fix(gsd): reconcile stale slice rows and rebuild STATE.md before DB close (#3658) 2026-04-13 08:17:06 -04:00
tests fix(security): activate auth middleware and harden shutdown/update routes (#4023) 2026-04-13 07:52:43 -04:00
web fix(security): activate auth middleware and harden shutdown/update routes (#4023) 2026-04-13 07:52:43 -04:00
app-paths.js
app-paths.ts
bundled-extension-paths.ts
bundled-resource-path.ts
claude-cli-check.ts fix(providers): route Anthropic subscription users through Claude Code CLI (#3772) 2026-04-08 07:20:20 -05:00
cli-web-branch.ts
cli.ts fix(cli): resolve duplicate validateConfiguredModel and missing getPiDefaultModelAndProvider import 2026-04-13 06:30:21 -05:00
extension-discovery.ts
extension-registry.ts
headless-answers.ts
headless-context.ts
headless-events.ts fix(headless): keep idle timeout off during interactive tools 2026-04-12 14:04:15 +02:00
headless-query.ts fix(headless): sync resources and use agent dir for query 2026-04-05 11:35:11 -07:00
headless-types.ts test: Added --output-format text|json|stream-json flag, standardized ex… 2026-03-26 11:34:21 -06:00
headless-ui.ts feat: stream full text and thinking output in headless verbose mode (#2934) 2026-03-27 21:57:11 -06:00
headless.ts fix(headless): keep idle timeout off during interactive tools 2026-04-12 14:04:15 +02:00
help-text.ts docs: add provider setup guide for third-party LLM providers (#3294) 2026-04-05 00:48:19 -04:00
loader.ts fix(auto): resolve resource-loader.js from GSD_PKG_ROOT on resume (#3949) 2026-04-10 20:00:46 -05:00
logo.ts
mcp-server.ts fix(mcp): expose every registered tool and fix SDK subpath resolution 2026-04-13 01:40:05 +00:00
models-resolver.ts
onboarding.ts fix: persist defaultProvider when user selects Claude Code CLI in onboarding (#4104) 2026-04-13 06:46:58 -04:00
pi-migration.ts
project-sessions.ts
provider-migrations.ts fix(cli): preserve anthropic api provider 2026-04-11 18:10:09 +02:00
remote-questions-config.ts chore: rename preferences.md to PREFERENCES.md for consistency (#2700) (#2738) 2026-03-26 16:09:59 -06:00
resource-loader.ts fix(cli): include all internal node_modules entries in pnpm merged dir 2026-04-12 02:12:13 -05:00
rtk.ts refactor(gsd): extract duplicated status guards and validation helpers (#2767) 2026-03-26 18:14:43 -06:00
security-overrides.ts fix(security): add configurable overrides for command allowlist and SSRF blocklist 2026-04-02 13:45:05 +02:00
startup-model-validation.ts fix(models): block unconfigured models from selection surfaces 2026-04-12 17:25:06 -05:00
startup-timings.ts
tool-bootstrap.ts
update-check.ts fix(update): fetch latest version from registry 2026-04-09 18:39:16 +02:00
update-cmd.ts fix(update): fetch latest version from registry 2026-04-09 18:39:16 +02:00
web-mode.ts fix(windows): harden portability across runtime and tooling 2026-04-10 20:33:18 -05:00
welcome-screen.ts fix(ui): remove 200-column cap on welcome screen width 2026-04-05 17:41:21 -05:00
wizard.ts fix(remote-questions): empty-key entry in auth.json shadows valid Discord bot token (#2737) 2026-03-26 16:16:42 -06:00
worktree-cli.ts refactor: move GSD metadata from commit subject scopes to git trailers 2026-03-25 22:56:48 +00:00
worktree-name-gen.ts