Commit Graph

7259 Commits

Author SHA1 Message Date
gsxdsm
47e4919a78 Merge pull request #1453 from Runfusion/gsxdsm/fast-tests
refactor(ci): thin trusted merge gate with flaky-test deletion ratchet
2026-06-05 14:52:12 -07:00
gsxdsm
b8eea85dc9 Merge pull request #1432 from Runfusion/feat/column-agent-assignment
feat: per-column agent assignment for workflow columns
2026-06-05 14:19:53 -07:00
gsxdsm
59364e7c58 Address PR review feedback round 2 (#1432)
- R10 kill-switch: workflowColumns flag now gates the execution path (resolver
  installation + resume pass 2), making the documented rollback real
- resolver: skip parse candidates whose templateNodeId doesn't exist under the
  foreach (disambiguation guard)
- editor: reset the project-scoped agents cache on projectId change
- tests: kill-switch inertness, defer→own-settings release, candidate skip
2026-06-05 13:59:50 -07:00
gsxdsm
5aa6cad168 Address PR review feedback (#1453)
- boot-smoke: shutdown verdict now requires SIGTERM actually delivered and a
  clean exit (code 0 or SIGTERM); EADDRINUSE port race retries with a fresh
  port (3 attempts)
- test-changed: rename shouldForceFullSuite -> isSharedInfraChange (it routes
  to gate mode, not full); run the changed-mode gate under the isolation guard
- workflows: least-privilege permissions (contents: read) on pr-checks and
  full-suite
2026-06-05 13:58:34 -07:00
gsxdsm
4209195743 fix(ci): deflake foreach palette test — wait for graph hydration before the palette click, extend node waitFor timeout 2026-06-05 09:44:45 -07:00
gsxdsm
482fc25add Merge main into fast-tests: keep both CONCEPTS additions (workflow columns/plugins + merge-gate testing vocabulary) 2026-06-05 09:37:22 -07:00
gsxdsm
2a0223472e Address PR review feedback (#1432)
- delimiter-safe foreach instance-id resolution via IR-validated candidates
- restart watcher handles binding removal/defer-flip and re-keys the reverse
  heartbeat guard on agent change/delete
- governing-node stamp owned by the pass-initiating foreach instance (race fix)
- editor: policy-escalation confirm/retry handshake on save; foreach children
  inherit the override note; project-scoped agent fetches; picker disabled on
  registry fetch error; column-agent strings in the canonical i18n catalog
- tests: update-tool escalation surface, PATCH escalation route, parity bound
  to run-derived stages, try/finally cleanup, deterministic event waits,
  symmetric defer surfaces, binding-release regression
2026-06-05 09:29:04 -07:00
gsxdsm
5a4bb9eeeb feat(test): pnpm test runs gate + affected set; remove implicit full-suite escalation (the local OOM path)
- decideExecutionPlan: implicit wide-blast reasons (missing base, diff failed,
  no changes, shared infra, unmapped package) route to new gate mode instead of full
- CI===true force-full branch removed (CI no longer calls test-changed.mjs)
- changed mode runs pnpm test:gate before the affected set
- full suite reachable only via explicit --full / FUSION_TEST_FULL=1
- characterization tests updated + new only-explicit-full invariant test
2026-06-05 09:08:20 -07:00
gsxdsm
fd7fed22f4 refactor(ci): thin PR gate to lint/typecheck/build/gate; demote full suite to non-blocking push-to-main workflow
- pr-checks.yml: gate job = boot smoke + pnpm test:gate; shards/slow/inventory removed
- full-suite.yml (new): 4-way shards, engine slow tier, inventory guard on push to main
- ci.yml deleted (trigger-disabled since FN-1541; was dead config)
- ci-workflow.test.ts rewritten to pin the new gate shape; release/signing blocks preserved
- docs/contributing.md: pnpm test:gate is the merge gate; verify:workspace repositioned as deep opt-in

BRANCH-PROTECTION CUTOVER: set required checks to exactly [Lint, Typecheck, Build, Gate] after merging; open PRs must rebase.
2026-06-05 09:02:36 -07:00
gsxdsm
98d5d83e95 feat(test): add curated engine-core gate suite and test:gate command 2026-06-05 08:55:43 -07:00
gsxdsm
d05d5f575f fix(review): apply autofix feedback 2026-06-05 00:57:49 -07:00
gsxdsm
7a4f6aa506 test(engine): column-agent surface matrix, parity invisibility proof, docs
U7: full mode × surface × own-settings matrix ledger with 5 gap-filling
tests, default-workflow zero-binding parity assertions, changeset covering
the complete feature, and a workflow-steps.md authoring section for column
agents.
2026-06-05 00:32:52 -07:00
gsxdsm
41f25d5c52 feat(engine): effective column agent becomes the execution principal
U5: action-gating contexts, the heartbeat deferral gate, a two-pass
resumeTaskForAgent, and the reverse-direction agent.taskId guards (via a
new isAgentEffectivelyExecuting callback wired at the in-process runtime)
all consult the column-effective agent; the restart watcher re-resolves
column bindings per tick for bound graph sessions, hot-swapping on
agent-changed and falling back without restart on agent-deleted.
2026-06-05 00:19:13 -07:00
gsxdsm
4fa54075ad feat(engine): execute and step-execute sessions run as the column agent
U4: seams stamp the governing node id into run context; a per-seam
resolveSeamColumnAgent feeds the core resolver and threads the effective
agent through resolveExecutorSessionModel, runtime hints, persona, memory
tools, and StepSessionExecutor attribution. Characterization tests pin the
no-binding path byte-identical. Gating/deferral principal moves in U5.
2026-06-05 00:05:02 -07:00
gsxdsm
75ebe23b4f feat(dashboard): column agent picker, override visibility, write-time validation
U6: WorkflowColumnPanel agent picker + defer/override toggle with specified
interaction states (flags-off hint, loading, fetch-error, stale-agent
warning, bound-column badge); WorkflowNodeEditor overridden-by-column-agent
note + stale-id treatment; assertColumnAgentsExist + confirmPolicyEscalation
gate (R13) on workflow save routes; flowToIr now preserves column agent
bindings through the editor round-trip.
2026-06-04 23:53:22 -07:00
gsxdsm
d88bfc4c75 feat(engine): custom workflow nodes run as their column's agent
U3: per-run IR resolution feeds the core column-agent resolver at the
runCustomNode seam; override supersedes node agent/model/persona wholesale,
defer fills bare nodes only; adoption and fallback are audited via logEntry;
raw-CLI nodes log a skip. Also fixes the customInstructions persona drift —
node-level executor:"agent" persona injection now uses the typed
soul/instructionsText fields (KTD-6).
2026-06-04 23:53:22 -07:00
gsxdsm
e421774f6a feat(core): column agent IR schema, validation, and effective-agent resolver
U1+U2 of the column-agent plan: WorkflowColumnAgent on WorkflowIrColumn
(defer/override), template-subgraph column validation, v2-only-feature
registration, plugin-sdk type parity, and the shared core resolver with
instanceNodeId format ownership moved to core.
2026-06-04 23:35:32 -07:00
gsxdsm
7b961d63f5 Merge pull request #1428 from Runfusion/gsxdsm/compound-plugin
Fix Settings plugin installs registering unloadable directory paths
2026-06-04 23:23:04 -07:00
gsxdsm
66f1db122b Fix quality-backfill suites broken by fast-tests x workflow-columns merge race
Main went red when the fast-tests quality-backfill projects (PR #1385)
landed alongside the workflow-columns stream (PR #1424) — the new test
projects were written against pre-stream code:

- TaskFieldsSection.css toggle knob used background: #fff, violating the
  theme-token assertion in AgentListModal's styling-parity test; use
  var(--card) per the SkillsView toggle convention
- ListView.test.tsx api mock lacked fetchBoardWorkflows (TaskDetailModal
  now calls it on mount)
- chat.test.ts and routes-agent-import.test.ts @fusion/core mocks lacked
  registerTraitHookImpl (engine merge-trait registers hooks at import)
- auto-merge-toggle-blank.mobile and board-mobile-initial-render used
  vi.runAllTimers(), which never terminates now that sse-bus starts a
  keepalive setInterval; use vi.runOnlyPendingTimers()

Both quality-backfill projects now pass fully: 7151/7151 across 414
files.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 23:02:58 -07:00
gsxdsm
b1ebb22010 Merge current main (fast-tests quality-backfill projects) into plugin install fixes 2026-06-04 22:43:52 -07:00
gsxdsm
02e53b24b6 Merge pull request #1425 from tomdurrant/fix/opencode-go-api-key-env
Fix opencode-go model sync — pass API key to CLI and strip prefix from model IDs
2026-06-04 22:36:08 -07:00
gsxdsm
784021e95c Tighten plugin install route tests to full entry-resolution contract (#1428)
- Bundled fallback assertions for dependency-graph/reports now require
  the bundled.js entry-file suffix instead of just containing the id
- Add route-level fallback cases for dist/index.js and src/index.ts

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 22:12:36 -07:00
gsxdsm
7dde43a63b Address PR review feedback (#1428)
- Add heal block to createPluginRouter's enable handler so it matches
  routes.ts (directory-path registrations re-pointed at entry files)
- Test the 400 "no loadable entry file" install branch
- Add a real-fs drift-guard test asserting the CLI and @fusion/core
  copies of resolvePluginEntryPath resolve identically

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 22:10:20 -07:00
gsxdsm
742989c402 Merge remote branch updates (workflow-defined custom columns stream + main) into plugin install fixes 2026-06-04 21:58:26 -07:00
gsxdsm
4426eb8d74 Fix Settings plugin installs registering unloadable directory paths
Plugins installed from Settings → Built-in Plugins registered the
manifest directory as the plugin path, but since FN-4128 the loader
requires a loadable entry FILE (Node ESM cannot import directories),
so enabling failed with "Plugin entry must be a file, got directory".
Only the CLI startup path had been migrated to entry-file resolution,
which is why CLI-auto-installed plugins worked and Settings installs
never did.

- Add resolvePluginEntryPath (bundled.js → dist/index.js →
  src/index.ts) to @fusion/core; the CLI keeps its local copy (its
  test fs mocks don't reach externalized core) with sync comments
  both ways.
- Register the resolved entry file in both dashboard install routes;
  400 with a clear message when a package has no loadable entry.
- Heal legacy directory-path registrations on enable, mirroring the
  CLI's startup heal, so existing broken rows recover from the UI
  without a restart.
- Route tests: assert installs register entry files, cover the
  enable-route heal, and update existing install tests to the
  entry-file contract.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 21:57:46 -07:00
gsxdsm
e5bab640f9 Merge pull request #1385 from Runfusion/gsxdsm/fast-tests
perf: speed up test suite across inner loop, full suite, and CI
2026-06-04 18:38:56 -07:00
gsxdsm
d05226f054 Merge pull request #1424 from Runfusion/gsxdsm/step-inversion
feat: step inversion — steps as workflow-modelable nodes (foreach/step-review/parse-steps/code, parallel execution, custom task fields)
2026-06-04 18:17:55 -07:00
Tom Durrant
978d07c96c Address PR review comments
- Update test assertions for bare model IDs
- Add deduplication guard for models with same bare ID
- Add validation for empty model IDs after prefix stripping
- Add test for API key forwarded as env var to spawn
- Add test for deduplication and empty model ID guard
- Extract shared handleOpencodeGoApiKeySaved helper
- Add changeset for the published package
2026-06-05 11:12:40 +10:00
Tom Durrant
1ae2555dd4 fix: strip provider prefix from opencode-go model IDs
normalizeOpencodeGoModel was prefixing model IDs with 'opencode-go/'
(e.g. 'opencode-go/deepseek-v4-flash'), but the Pi SDK sends the model
id field as the model name in API requests. The OpenCode API expects
bare model names (e.g. 'deepseek-v4-flash'), not prefixed ones.

Now strips the 'opencode/' or 'opencode-go/' prefix entirely so the
registered model ID matches what the API expects.
2026-06-05 10:40:01 +10:00
Tom Durrant
295d726768 fix: pass OPENCODE_API_KEY env var when syncing opencode-go models
discoverOpencodeGoModels() spawns 'opencode models opencode --refresh' but
never passed the saved API key as OPENCODE_API_KEY. The opencode CLI's
internal OpencodePlugin checks this env var to decide whether to show
paid models; without it, only free (cost.input === 0) models appear.

Now threads the apiKey from auth storage through to the spawned process
environment, so the CLI sees the user's Go subscription and returns the
full model catalog including paid models like Claude, GPT-5.x, Gemini, etc.

Callers in serve.ts, daemon.ts, and dashboard.ts all updated to read
the key from dashboardAuthStorage and pass it to refreshOpencodeGoModels.
syncStartupModels reads from authStorage in StartupSyncOptions.
2026-06-05 10:07:27 +10:00
gsxdsm
6f7f6860be fix: address PR review feedback (#1424)
- restore customFields on unarchive; reconcile all occupants on field-schema edits (store.ts)
- serialize per-field saves + controlled inputs in TaskFieldsSection (race fixes)
- fn_workflow_get includes layout; Array.isArray guards in validateCodeNodeSources
- per-instance graphStepActiveContext keying; rebase in instance worktree; clear run-once memo on RETHINK
- GET /api/step-parsers + registry-backed parser select (plugin parsers reachable from editor)
- translate new workflowNodes/workflowFields strings across all 5 non-en locales

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 16:16:50 -07:00
gsxdsm
86867c57b0 fix(ci): deflake seam-in-branch badge test — wait for graph hydration before Save, extend badge waitFor timeout
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 15:51:29 -07:00
gsxdsm
82f40a86b9 Merge branch 'main' into gsxdsm/compound-plugin 2026-06-04 15:34:31 -07:00
gsxdsm
0451172bfa fix(ci): theme-token conventions in field badges (white keyword, --text-muted) + roadmap plugin schema literal 107→108
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 14:43:54 -07:00
gsxdsm
021409d445 test(dashboard): regression tests for stepwise builtin editor render path (foreach group + template children + rework edges)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 14:34:53 -07:00
gsxdsm
3ebaa321f8 fix(review): apply code-review fixes — runId/foreachNodeId wiring, worktree-leak cleanup, rework re-execution, instance pruning, SIGKILL fallback, type dedup, board memo split, agent-native field-schema context + fn_workflow_get
17 findings from 12-reviewer code review applied:
- P1 runId trio (pin-probe/resume/markIntegrated used placeholder runId; 4-reviewer corroboration) + production-wiring tests
- P1 worktree/branch release on instance failure/exhaustion/abort
- P2 runGraphTaskStep no longer masks step-session failures; rejected memo cleared so rework re-executes
- P2 clearStaleInstanceStates wired at run start/end (mirrors branch pruning)
- P2 code-node timeout killSignal SIGKILL; dead template-recursion removed
- P1/P2 field-type re-declarations replaced with @fusion/core imports (stale comments removed)
- P2 Board memo split + TaskCard comparator stringify guard + modal prop-driven field defs
- HIGH agent-native: executor prompt injects custom-field schema/values; self-correcting rejection text; fn_workflow_get; fn_task_update bare-call guard; integration-conflict task log

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 14:01:55 -07:00
gsxdsm
94da14cd81 fix: lazy-load esbuild via createRequire (jsdom-safe engine import) + lint cleanup of dead helpers
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 13:19:55 -07:00
gsxdsm
7076dd4516 feat(sdk,dashboard,docs): U9 — save-time code validation route, SDK type exports, skill doc, step-inversion docs + changeset
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 13:15:50 -07:00
gsxdsm
60e9938f5a feat(core,engine): U7 — builtin stepwise coding workflow + trajectory parity & invariant suite; agent-tool surfaces for custom fields and IR authoring
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 13:15:49 -07:00
gsxdsm
af7c141976 feat(engine): U10 — parallel step execution: dependency scheduler, per-instance worktrees, ordered integration, conflict→rework (KTD-11)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 13:04:15 -07:00
gsxdsm
e87e745379 feat(dashboard): WorkflowFieldsPanel — field-definition authoring with live badge preview (U13 completion)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 12:44:43 -07:00
gsxdsm
14758f8edb feat(engine): U12e+U14 — parse-steps node handler, plugin parser adapter, code node runner (esbuild + child-process harness)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 12:44:43 -07:00
gsxdsm
4c3a226050 Fix Compound Engineering plugin install failing from Settings
Installing the Compound Engineering plugin from Settings → Built-in
Plugins failed with "Plugin manifest not found": the dashboard's
bundled-plugin fallback set (BUNDLED_PLUGIN_IDS in routes.ts) was
missing fusion-plugin-compound-engineering, so when the relative
./plugins/... path missed the server cwd, the bundled lookup was never
attempted. fusion-plugin-cli-printing-press had the same gap.

- Add both ids to the dashboard's BUNDLED_PLUGIN_IDS fallback set.
- Stage fusion-plugin-compound-engineering into dist/plugins via
  bundlePluginEntry in the CLI tsup config so packaged installs can
  resolve the bundled copy (every other bundled plugin already had a
  staging block).
- Add route tests that actually exercise the bundled fallback (the
  existing ones let cwd resolution succeed, so the fallback path was
  untested).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 12:31:08 -07:00
gsxdsm
5fa5740afc feat(dashboard,cli): U13 — schema-driven task fields UI (TaskFieldsSection, card badges, PATCH route, board-workflows fields payload, TUI chips)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 12:26:05 -07:00
gsxdsm
2cfa8a3282 feat(engine,core): U5+U6+U12core — step-review verdict handler, graph-source projection discipline, pluggable step-parser registry
- step-review node: reviewStep seam, verdict→outcome edges, UNAVAILABLE limiter, rethink reset-on-rework, split-branch advisory-only
- updateStep source:'graph': dependency-order done guard, audit-loud suppression, auto-reinit bypass; projection-first ordering
- runGraphTaskStep: per-step step-session physics pinned for graph-owned runs (closes U3 interim)
- step-parsers.ts registry (step-headings byte-identical move + json-steps), store delegates via registry

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 12:26:05 -07:00
gsxdsm
a5023e0284 feat(core): U11 — custom task fields validation authority, orphan-not-delete reconciliation, coerce gate
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 12:03:29 -07:00
gsxdsm
a782e5c04c feat(engine): U3 — foreach expansion, iterative instance sub-walk, bounded rework cycles, step-execute seam
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 12:03:29 -07:00
gsxdsm
ad5cd579be feat(dashboard): U8 — node editor authoring for foreach/step-review/parse-steps/code, rework edge inspector, template round-trip
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 11:50:45 -07:00
gsxdsm
0a3cc50f6f feat(core): U4-core — schema v108 (workflow_run_step_instances + tasks.customFields), instance CRUD trio, literal sweep
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 11:50:45 -07:00
gsxdsm
3d03505a62 feat(engine): U2 — runTaskStep/resetStepToBaseline substrate seams with blast-radius guard (RETHINK extraction)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 11:50:45 -07:00