singularity-forge/packages
Mikael Hugo 06b1fefd35
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 coding-agent core mega-cycle + skip function-body imports
Cycle 2 (the 13-node coding-agent mega) closed via two changes:

1. scripts/check-circular-deps.mjs — track function-body depth and
   skip require()/import() calls inside function bodies. They run on
   call, not at module evaluation, and therefore cannot cause
   module-graph cycles — same reasoning as the existing dynamic
   `await import()` skip. Generic improvement; benefits any pattern
   that uses lazy CommonJS require() to break a static cycle.

2. packages/coding-agent/src/core/extensions/loader.ts — removed the
   static `import * as _bundledCodingAgent from "../../index.js"`
   self-reference, which was the cycle-closer. It only populated
   STATIC_BUNDLED_MODULES for the Bun virtualModules path
   (`isBunBinary` branch in getJitiOptions), and SF is Node-26-only
   per operator policy (no Bun) — so the Bun branch is dead at
   runtime and dropping the static self-reference is safe. The two
   map entries that referenced it (@singularity-forge/coding-agent
   and the @mariozechner alias) are commented out at the same site
   with a pointer to the top-of-file note.

Net effect across the full session:
  start of session:      9 cycles
  walker false-positive
    cleanups landed:     dropped 6 type-only + dynamic-import false
                         positives
  tui ↔ overlay-layout:  CURSOR_MARKER moved to overlay-types.ts
  SF autonomous-rollback
    chain (3 targeted
    cuts):               experimental → preferences-serializer,
                         classifier → lazy rollback import,
                         preferences-models → runaway-defaults.js
  this commit:           coding-agent loader self-reference dropped

Final state:  zero circular dependencies in 1193 scanned files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 00:42:09 +02:00
..
agent-core chore(release): 2.75.3 → 2.75.4 + workspace dependency refresh 2026-05-16 23:59:14 +02:00
ai remove: SF voice IVR / ElevenLabs paging — migrated to centralcloud 2026-05-17 17:42:16 +02:00
coding-agent fix(circular): break coding-agent core mega-cycle + skip function-body imports 2026-05-18 00:42:09 +02:00
daemon refactor(sf): separate daemon from server identity 2026-05-17 19:18:33 +02:00
google-gemini-cli-provider chore(release): 2.75.3 → 2.75.4 + workspace dependency refresh 2026-05-16 23:59:14 +02:00
native feat: replace launchd with systemd user-unit install path 2026-05-17 17:33:34 +02:00
openai-codex-provider chore(release): 2.75.3 → 2.75.4 + workspace dependency refresh 2026-05-16 23:59:14 +02:00
rpc-client fix: harden sf server control loop 2026-05-17 21:13:12 +02:00
tui fix(circular): skip type-only imports + break tui ↔ overlay-layout cycle 2026-05-18 00:28:53 +02:00