singularity-forge/scripts
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
..
tmp-check-test-imports sf snapshot: uncommitted changes after 246m inactivity 2026-05-17 08:28:04 +02:00
base64-scan.sh chore: purge bun from internal toolchain 2026-05-02 08:38:20 +02:00
build-web-host.mjs feat: operational glue for upgrade-safety chain 2026-05-17 22:57:26 +02:00
build-web-if-stale.cjs feat: make sf server the operator entrypoint 2026-05-17 17:23:46 +02:00
bump-version.mjs refactor: rename pi-* packages to forge-native names (Phase 1) 2026-05-10 11:28:01 +02:00
check-circular-deps.mjs fix(circular): break coding-agent core mega-cycle + skip function-body imports 2026-05-18 00:42:09 +02:00
check-protected-deletions.mjs fix(build): skip protected deletion check outside git worktree 2026-05-17 23:18:41 +02:00
check-sf-extension-inventory.mjs fix(build): skip sf inventory git scan outside worktree 2026-05-17 23:24:45 +02:00
check-skill-references.mjs chore: commit current workspace state 2026-05-05 14:46:18 +02:00
check-test-imports.mjs fix(scripts/check-test-imports): filter TS keywords + local declarations 2026-05-17 00:46:10 +02:00
check-test-imports.test.mjs fix(subagent-runner): drop spurious 10s STUCK warning on session.prompt 2026-05-16 23:49:43 +02:00
check-versioned-json.mjs fix(build): skip versioned json git scan outside worktree 2026-05-17 23:21:45 +02:00
check-versioned-json.test.mjs sf snapshot: uncommitted changes after 43m inactivity 2026-05-05 21:39:56 +02:00
ci_monitor.cjs chore: commit current workspace state 2026-05-05 14:46:18 +02:00
ci_monitor.md feat: add GitHub Workflows skill with CI workflow and ci_monitor tool (#294) 2026-03-13 22:31:17 -06:00
copy-export-html.cjs refactor: rename review gate agent 2026-05-14 19:43:01 +02:00
copy-resources.cjs fix(auto): abort swarm checkpoint loops 2026-05-15 10:55:37 +02:00
copy-themes.cjs refactor: rename review gate agent 2026-05-14 19:43:01 +02:00
dev-cli.js chore: node 24 native APIs, import.meta.dirname, parsers rename, dep updates 2026-05-02 06:18:25 +02:00
dev-server.js feat(dev-server): auto-reload on SF extension + coding-agent + git upgrades 2026-05-17 21:03:49 +02:00
dev.js chore: commit current workspace state 2026-05-05 14:46:18 +02:00
docs-prompt-injection-scan.sh feat(ci): skip build/test for docs-only PRs and add prompt injection scan (#1699) 2026-03-21 08:39:03 -06:00
ensure-source-resources.cjs fix: auto-rebuild workspace packages when src is newer than dist 2026-05-17 17:19:25 +02:00
ensure-workspace-builds.cjs sf snapshot: uncommitted changes after 131m inactivity 2026-05-09 02:53:47 +02:00
generate-changelog.mjs chore: commit current workspace state 2026-05-05 14:46:18 +02:00
generate-features-inventory.mjs fix(lint): fix all pre-existing lint failures 2026-05-11 04:02:31 +02:00
generate-release-manifest.mjs feat: add source-mounted sf server self-deploy 2026-05-17 22:00:01 +02:00
install-hooks.mjs fix: block extension declaration deletions 2026-05-05 18:28:07 +02:00
install-hooks.sh refactor: update log prefixes and string values from gsd- to sf- namespace 2026-04-15 15:37:12 +02:00
install-pi-global.js sf snapshot: uncommitted changes after 131m inactivity 2026-05-09 02:53:47 +02:00
link-workspace-packages.cjs feat: replace launchd with systemd user-unit install path 2026-05-17 17:33:34 +02:00
model-smoke-benchmark.mjs refactor: rename pi-* packages to forge-native names (Phase 1) 2026-05-10 11:28:01 +02:00
parallel-monitor.mjs feat(sf): align uok task state and steering 2026-05-08 06:57:59 +02:00
postinstall.js feat: replace launchd with systemd user-unit install path 2026-05-17 17:33:34 +02:00
pr-risk-check.mjs sf snapshot: uncommitted changes after 43m inactivity 2026-05-05 21:39:56 +02:00
prepublish-check.mjs style: format repository with biome 2026-05-05 14:31:16 +02:00
preview-dashboard.ts refactor: rename pi-* packages to forge-native names (Phase 1) 2026-05-10 11:28:01 +02:00
recover-sf-1364.sh sf snapshot: uncommitted changes after 49m inactivity 2026-05-08 01:07:24 +02:00
require-tests.sh chore: sync workspace state after rebrand 2026-04-15 14:54:20 +02:00
rtk-benchmark.mjs chore: commit current workspace state 2026-05-05 14:46:18 +02:00
run-vega-source-server.mjs fix(deploy): use portable docker stop timeout flag 2026-05-17 23:00:56 +02:00
secret-scan.mjs feat(secret-scan): SF_SECURITY_FAST contract for the regex-only fast path 2026-05-14 07:57:02 +02:00
secret-scan.sh feat(secret-scan): SF_SECURITY_FAST contract for the regex-only fast path 2026-05-14 07:57:02 +02:00
stage-web-standalone.cjs style: format repository with biome 2026-05-05 14:31:16 +02:00
sync-pkg-version.cjs chore: commit current workspace state 2026-05-05 14:46:18 +02:00
test-replace.txt chore: sync workspace state after rebrand 2026-04-15 14:54:20 +02:00
test-reporter-compact.mjs style: format repository with biome 2026-05-05 14:31:16 +02:00
test-write.txt chore: sync workspace state after rebrand 2026-04-15 14:54:20 +02:00
uninstall-pi-global.js sf snapshot: uncommitted changes after 131m inactivity 2026-05-09 02:53:47 +02:00
update-changelog.mjs chore: commit current workspace state 2026-05-05 14:46:18 +02:00
upgrade-vega-source-server.mjs fix(deploy): use portable docker stop timeout flag 2026-05-17 23:00:56 +02:00
validate-model-cost-table.mjs chore: formatter / linter touch-up (230 files) 2026-05-16 21:19:53 +02:00
validate-pack.js refactor(sf): separate daemon from server identity 2026-05-17 19:18:33 +02:00
validate-pack.sh refactor: update log prefixes and string values from gsd- to sf- namespace 2026-04-15 15:37:12 +02:00
verify-s03.sh refactor: rebrand gsd_ tool names and references to sf_ namespace 2026-04-15 15:51:38 +02:00
verify-s04.sh sf snapshot: pre-dispatch, uncommitted changes after 53m inactivity 2026-04-30 19:10:38 +02:00
version-stamp.mjs chore: commit current workspace state 2026-05-05 14:46:18 +02:00
watch-resources.js chore: commit current workspace state 2026-05-05 14:46:18 +02:00
with-env.mjs style: format repository with biome 2026-05-05 14:31:16 +02:00