singularity-forge/src
Mikael Hugo 5ac550d62a
Some checks are pending
sf self-deploy / build, test, and publish server image (push) Waiting to run
sf self-deploy / deploy test and probe (push) Blocked by required conditions
sf self-deploy / promote prod (push) Blocked by required conditions
fix(circular): break SF safety/autonomous-rollback chain (7-edge ring)
The cycle was a clean 7-edge ring:
  preferences → preferences-models → uok/auto-runaway-guard →
  detectors/periodic-runner → detectors/crash-loop-classifier →
  last-green → experimental → preferences

Three targeted cuts, each chosen for being a real architectural smell:

1. experimental → commands-prefs-wizard: the wizard was just
   re-routing the same `serializePreferencesToFrontmatter` import
   from preferences-serializer. experimental.js now imports from
   preferences-serializer directly. Edge removed.

2. crash-loop-classifier → safety/autonomous-rollback: detection
   should not directly trigger action — that couples concerns and
   creates the runtime cycle. Switched to a lazy `await import()`
   inside `crashLoopGate.execute()` (which is already async). The
   call site is unchanged from the caller's perspective; the
   runtime module-graph edge is gone. Walker skips dynamic
   imports.

3. preferences-models → uok/auto-runaway-guard: preferences-models
   only needed 6 runaway-threshold CONSTANTS, but pulling them from
   auto-runaway-guard dragged the whole detector/preferences/
   experimental subsystem into the preferences-models graph.
   Extracted those 6 constants to a new leaf module
   uok/runaway-defaults.js. Both preferences-models and the guard
   import from there. auto-runaway-guard re-exports the constants
   so existing call sites keep working without churn.

Net: 2 cycles → 1 cycle. 29/29 tests pass across the 5 touched
modules (autonomous-rollback, experimental-flags, crash-loop-
classifier detector, auto-runaway-guard, preferences-models).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 00:36:40 +02:00
..
resources fix(circular): break SF safety/autonomous-rollback chain (7-edge ring) 2026-05-18 00:36:40 +02:00
tests feat(upgrade): drain HTTP requests + autonomous-loop SIGTERM awareness 2026-05-17 22:56:22 +02:00
web feat: operational glue for upgrade-safety chain 2026-05-17 22:57:26 +02:00
app-paths.ts feat: make sf server the operator entrypoint 2026-05-17 17:23:46 +02:00
bundled-extension-paths.ts
bundled-resource-path.ts
claude-cli-check.ts
cli-key.ts
cli-logs.ts
cli-stats.ts
cli-status.ts
cli-web-branch.ts fix: harden sf server control loop 2026-05-17 21:13:12 +02:00
cli.ts feat: make sf server the operator entrypoint 2026-05-17 17:23:46 +02:00
env.ts
errors.ts
extension-discovery.ts
extension-registry.ts
headless-answers.ts remove A2A; swarm enrollment + status projection + web swarms view; headless refactor 2026-05-17 16:04:06 +02:00
headless-context.ts
headless-events.ts
headless-feedback.ts fix: auto-version-bump swallowed operator-direction; ptrmap + lock guards 2026-05-17 15:51:36 +02:00
headless-import-backlog.ts
headless-mark-state.ts
headless-query.ts remove A2A; swarm enrollment + status projection + web swarms view; headless refactor 2026-05-17 16:04:06 +02:00
headless-reflect.ts
headless-server-forward.ts fix: harden sf server control loop 2026-05-17 21:13:12 +02:00
headless-status.ts
headless-triage.ts fix: harden sf server control loop 2026-05-17 21:13:12 +02:00
headless-types.ts
headless-ui.ts fold: hashline_edit + hashline_read → Edit({match}) + Read({format}) modes 2026-05-17 17:39:59 +02:00
headless-uok-status.ts
headless-usage.ts
headless.ts fix: harden sf server control loop 2026-05-17 21:13:12 +02:00
help-text.ts refactor(sf): separate daemon from server identity 2026-05-17 19:18:33 +02:00
interactive-session-lock.ts
loader.ts
logger.ts
logo.ts
models-resolver.ts
onboarding.ts remove: SF voice IVR / ElevenLabs paging — migrated to centralcloud 2026-05-17 17:42:16 +02:00
pi-migration.ts
project-sessions.ts
provider-migrations.ts
remote-questions-config.ts
resource-loader.ts
rtk.ts feat: replace launchd with systemd user-unit install path 2026-05-17 17:33:34 +02:00
security-overrides.ts
startup-model-validation.ts
startup-timings.ts
status-projection.ts remove A2A; swarm enrollment + status projection + web swarms view; headless refactor 2026-05-17 16:04:06 +02:00
tool-bootstrap.ts
traces.ts
update-check.ts
update-cmd.ts
web-mode.ts fix: harden sf server control loop 2026-05-17 21:13:12 +02:00
welcome-screen.ts
wizard.ts
worktree-cli.ts
worktree-name-gen.ts