9abec9f2351a7b4fe87f623ccb588668e86da299
13007 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
9abec9f235 |
fix(gate): the fnxc check WROTE to the tree it was checking — nine PRs chased three defects (#3287)
Root-cause fix for the duplicate-PR pileup tracked in #3267. **Running the check modified the working tree.** ## Reproduction ``` clean: 0 files dirty $ node scripts/check-fnxc-future-dates.mjs # no flags, no --update-baseline exit 0 after: 1 file dirty → M scripts/lib/fnxc-future-dates-baseline.json ``` `:227` auto-tightened and `writeFileSync`'d on every run. ## Why that produced nine PRs The tightening is **right in substance** — the comment above it explains why banking a stale allowance is worse than re-recording. Doing it as a *side effect of checking* is what hurt: every worker who ran the gate received an identical uncommitted diff they had not written, and reasonably committed it. The clearest evidence is #3283 and #3285 — five minutes apart, `+0/-1` each, both deleting the same baseline line. **Neither author wrote that line.** The gate wrote it, in both of their checkouts. I also mis-attributed my own dirty tree to leftover work while retracting a measurement on #3277/#3278. The dirt was this script. ## The change Still computed, still reported loudly — only **written** under `--update-baseline`: ``` [check-fnxc-future-dates] baseline CAN BE TIGHTENED for 1 file(s): packages/cli/src/__tests__/cli-active-count-lanes.test.ts: 10 -> 5 run `pnpm check:fnxc-future-dates --update-baseline` to record it (one commit, one author) ``` **A plain run stays green rather than failing on a tightening.** Stamps age into the past on their own, so failing would redden main on a clock tick — which is precisely why the auto-write existed. Report, don't enforce. ## Measured, both directions | scenario | result | |---|---| | stale allowance, plain run | reports + hint; baseline **unchanged** (verified still inflated at 10) | | stale allowance, `--update-baseline` | `baseline written: 122 stamp(s) in 63 file(s)`; value reset to 5 | | clean tree, plain run | exit 0, **zero files dirty** | | `census --strict` / eslint | 0 / clean | The first row is the one that matters: I inflated an allowance, ran the check, and confirmed the file was **still inflated afterwards**. Asserting only "exit 0, no diff" would have passed even if the write had silently succeeded and produced no net change. ## Scope One script. CI is unaffected — it never committed the side-effect write, so that write was always discarded there. The only behaviour change is that an interactive run no longer edits your tree. This is a smaller intervention than the claim-protocol I proposed earlier in #3267, and I now think that one was treating a symptom: workers were not colliding because they lacked a protocol, but because the tool handed each of them the same diff. |
||
|
|
f2f6795010 |
FN-8635: keep worktree slider visible
Keep Command Center capacity controls visible and correctly editable across settings states. - Render Max worktrees in the shared full-width range wrapper. - Preserve capacity values after load failures and explain disabled worktree limits. - Add control tests, browser geometry coverage, documentation, and a release changeset. Files changed: .changeset/fn-8635-worktrees-slider.md | 7 + docs/dashboard-guide.md | 2 +- .../command-center/CommandCenterControls.css | 6 + .../command-center/CommandCenterControls.tsx | 63 +++++--- .../__tests__/CommandCenterControls.test.tsx | 76 ++++++++- packages/engine/e2e/fn-8635-worktrees-slider.mjs | 180 +++++++++++++++++++++ 6 files changed, 310 insertions(+), 24 deletions(-) Fusion-Task-Id: FN-8635 Fusion-Task-Lineage: fb9c2a46-3c5c-4871-bab4-c43af20cb4de Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
78dde73a75 |
chore(changeset): shorten over-limit summary (141 -> 106 chars)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
94ed527bb1 |
refactor(scheduler): the capacity gate's terminal check uses the shared isTerminalColumnRole (#3262)
**Rebased. The census claim in my original title was overtaken — this is now a correction, not a conversion.** ## Census: 0 before, 0 after #3261 got there first, by **recording** the fallback rather than converting it. Its `DELIBERATE` reasoning is correct and I kept it verbatim. ## What this corrects That note says: > Recorded rather than converted because **there is nothing to convert TO**. There is. **`isTerminalColumnRole` in core is this predicate, term for term** — verified against `column-roles.ts` rather than assumed: | | hand-rolled | `isTerminalColumnRole` | |---|---|---| | flags present | `flags.complete === true \|\| flags.archived === true` | same, via the two role helpers | | flags undefined | `columnId === "done" \|\| columnId === "archived"` | same, via `LEGACY_COMPLETE/ARCHIVED_COLUMN_ID` | And the helper's own doc names this exact case — it exists *"because the pattern `column !== \"done\" && column !== \"archived\"` is the single most repeated shape in the backlog"* and *"keeps callers from re-deriving it and from accidentally dropping one half."* **The rest of #3261's argument stands and is preserved.** The undefined-flags arm is a **live** path, and treating an unreadable workflow as non-terminal would count a finished card's retained worktree against live capacity. That reasoning is about the *fallback's existence*, not about *where the predicate lives* — and the shared helper carries the identical fallback. Second time in this file: `isWipColumnTask` two lines up records that it was itself once *"a hand-rolled copy of `isWipColumnRole`"*. That's an argument for the helper being easy to miss, not for anyone being careless. ## Coverage, stated rather than implied **Blinding this predicate to `false` leaves all 22 scheduler suites green (365 tests)** — the capacity logic it feeds has no behavioural coverage at all. The added test pins the **lane vocabulary** (both renamed terminal lanes, the non-terminal lanes, the legacy fallback). It does **not** pin the capacity arithmetic, which stays unguarded and belongs to that gate's owner. Under-counting is the dangerous direction: the commit adding the gate reports `maxWorktrees=4` with **a fifth worktree admitted**. ## Verification - 23 scheduler suites — **368 green**; `tsc` clean - Census 0 → 0; DELIBERATE count unchanged at 148; inert ratchet green 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
48b00acc7b |
fix(core): legacy adoption preserves reviewing/landing — restart no longer pauses a live AI merge
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
e56116d8e9 |
chore(fnxc): retire the stale scheduler allowance left by the rollover re-record (#3283)
**The date gate passes on `main` — but not because this was fixed.** ## What actually happened UTC rolled over to `2026-08-01`. The gate compares against the later of local and UTC, so two `2026-08-01` stamps in `scheduler.ts` became valid on their own. That is the ratchet's normal drop path and is fine. `#3278` then re-recorded the baseline "after the UTC rollover", which set `scheduler.ts` to **allow 1** — exactly enough to absorb the one stamp that did *not* age out: ``` FNXC:ConcurrencyAdmission 2026-08-06-09:00 ← six days out, wrong on any calendar ``` So the gate reports `123 known future-dated stamp(s), none added` and exits 0, with a stamp inside it that will not be valid until next week. ## Why this is the failure the gate exists to catch A blanket re-record cannot distinguish **aged out** from **still wrong**, so it launders the second past the first. The sibling ratchet states the rule outright: > Do NOT re-record the baseline to clear this — that is the same false green one layer up. This is that, one layer up again: not a guard cleared by a baseline, but a *baseline refresh* clearing a guard as a side effect. ## The fix - stamp repointed to `2026-08-01` — today in UTC, which is the calendar the gate actually compares against - **allowance removed**, not left at 1, so the entry cannot be regrown into **Mutation-verified**: with the allowance gone, restoring `2026-08-06` exits **1**. Before this change the same stamp exited **0**. That is the whole point — the ratchet can now see it. ## One thing worth carrying forward A six-days-out stamp is not a timezone slip. Neither the old `date -u` guidance nor the current local-date guidance in AGENTS.md would have prevented it, and CI-only checking cannot catch it before merge. This is the concrete case for running the date check at author time, which I have flagged but not landed since it changes the gate's contract. ## Verification - `check-fnxc-future-dates` — exit 0, allowance removed - `scheduler` suites — **148 pass** - `tsc --noEmit` (engine) — 0 errors Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
c67aafde1c |
revert(fnxc): restore seven author stamps I falsified while chasing a gate bug (#3282)
Closes #3279. Undoes the damage my #3261 did, now that #3277 has landed and made it safe. ## What went wrong #3277 established that last night's "future-dated" stamps were **correct** — the author's local date in a UTC+1 container, written minutes before their commits. The gate compared against the runner's local calendar (PDT) and called them tomorrow. I diagnosed it as author error and repointed seven stamps to turn main green. The values I wrote were **neither the author's local time nor UTC** — invented times chosen to satisfy a broken check. The FNXC record is this project's why-does-this-exist trail, so those stamps misstated when the work happened. ## Restored verbatim | file | mine (wrong) | restored | |---|---|---| | `workflow-column-boundary-capacity.test.ts` | `22:30` | `2026-08-01-00:30` | | `runtimes/in-process-runtime.ts` | `22:20` | `2026-08-01-00:20` | | `scheduler.ts` (`MissionReconciliation`) | `22:00` | `2026-08-01-00:00` | | `workflow-column-boundary-hooks.ts` | `22:20` | `2026-08-01-00:20` | | `workflow-column-boundary.ts` ×2 | `22:20` | `2026-08-01-00:20` | | `workflow-graph-task-runner.ts` | `22:20` | `2026-08-01-00:20` | ## The check that mattered Sequencing was deliberate — #3277 had to land first or this would have re-reddened main. The real question is whether the gate now accepts the **originals**, measured across the rollover boundary at local `2026-07-31 17:23 PDT` / UTC `2026-08-01 00:23`: ``` America/Los_Angeles exit 0 Europe/Paris exit 0 UTC exit 0 Asia/Tokyo exit 0 ``` `123 known future-dated stamp(s), none added`. **No baseline change needed** — #3278's pruning already re-recorded `scheduler.ts`, and these are known stamps rather than new ones. Stamps only: `git diff` shows **zero** non-FNXC lines, 7 insertions / 7 deletions across 6 files. `census --strict` 0, `pnpm test:gate` 0. ## The part worth keeping I argued against exactly this on #3263 — *"it rewrites stamps whose authors are not us"* — and then did it myself six lines later, because I was confident about a cause I had not checked. The commits' timestamps were available the entire time; I read the runner's clock and never asked what timezone the **author** was in. Four of last night's seven PRs were fixing something that was not broken. This is the cleanup for my share of that. |
||
|
|
500f40e65b |
fix: descriptive waiting badges (Queued to revise / Queued behind FN-X) + dependency-free blocked exits replan calmly
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
7acfaf6c10 |
docs(agents): date -u is the only rule safe from every timezone — #3277's new instruction inverts it (#3281)
#3277 fixed the gate correctly and I have no argument with the code: `today = max(localToday, utcToday)`, so a stamp is future only if ahead of **both** calendars. That is the right shape for a fleet spread across timezones. It reversed the **authoring rule** along with it, and that part is backwards: > **Write your own local date and a real clock time.** … Do NOT reach for `date -u` Under #3277's own comparison, that reintroduces the failure it just fixed. ## Measured against the merged gate, on current main ``` stamp 2026-08-02 (a UTC+2 author's local date at 22:00 UTC) gate exit=1 REJECTED stamp 2026-08-01 (the same author using date -u) gate exit=0 ACCEPTED ``` Run today, 2026-08-01, with the runner in PDT. Probe file added and removed; tree clean after. ## Why `date -u` is the only safe rule The bound is `max(localToday, utcToday)`, and **UTC only moves forward between writing a stamp and checking it**. So a `date -u` stamp has already been passed by the bound at check time, from every timezone, always. No other rule has that property. Writing your own local date is safe *only if you are not east of UTC*. During a UTC+2 author's evening their local date is already tomorrow in UTC, and the stamp is rejected until UTC catches up hours later — which is exactly the "five reds in two hours" incident #3277 diagnosed. The gate change widens the window enough that CI usually catches up before anyone looks, but "usually, after a delay" is a race, not a rule, and it fails hardest for the authors furthest east. The prior instruction (`date -u`) was correct; what was wrong was its stated *rationale* ("validates against UTC"), which is what I was fixing in #3276 before #3277 landed. This PR keeps #3277's both-directions history — the part that explains why neither naive rule works on its own — and restores the prescription. ## Why not just comment on #3277 It is merged, and AGENTS.md is the file every agent reads before writing a stamp. Leaving the inverted rule in place for a review cycle means every east-of-UTC author in the fleet follows it. Filed as a PR so it can be judged on the measurement rather than on my say-so — if the numbers above are wrong, this should be closed. **Supersedes #3276**, which documented the pre-#3277 mechanism and is now stale. I will close it once this is judged. Docs only; no changeset (AGENTS.md is excluded). |
||
|
|
40bb621fd8 |
fix(gate): print the exact UTC stamp when the date gate fails (#3271)
## What **Three separate commits landed a future-dated FNXC stamp this evening**, each turning this blocking gate red on main (#3261 fixed six across five engine files; #3270 fixes a third in core). This makes the failure message actionable. Tooling only. The message said *"Use the current date and a real clock time."* That tells the author to use the value they already believed they had. It now prints the exact stamp: ``` Current UTC stamp to use: 2026-07-31-23:39 ``` Copy-paste instead of a second judgement call, computed only on a path that has already failed. ## Why a message change rather than a rule **The offsets are the evidence.** `00:50` against `23:34`; the engine batch similar — consistently **1–2 hours into tomorrow**, not wrong dates. That is the shape of a clock or timezone difference, not carelessness, and no amount of restating the rule fixes a clock. AGENTS.md already says to take the stamp from `date -u`; three actors violated it in one evening anyway. **I am one of those actors** — I have broken this rule twice today. So this is not a complaint about anyone's diligence; it is an argument that the instruction is doing less work than a printed value would. ## I made the same mistake inside this change The FNXC comment documenting the fix was stamped **two minutes ahead** of the real UTC time. Corrected from `date -u`. **The gate did not catch it** — it scans `packages/` and not `scripts/`, so FNXC stamps in the tooling itself are entirely unchecked. That is a genuine scope gap and I am reporting rather than closing it: pulling `scripts/` into scope would surface existing stamps across the tooling and needs its own baseline pass, which does not belong in a message fix. There is something clarifying about writing a future-dated stamp *in the fix for future-dated stamps*, in a file the checker cannot see. It is the same lesson this whole session kept producing — **an instrument's blind spot is invisible in exactly the way its subject is** — and I walked into it while holding the flashlight. ``` lint clean; gate prints the stamp on failure ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved validation feedback for future-dated entries by showing the exact UTC timestamp format and value to use when corrections are needed. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
5acd8e987b |
fix(fnxc): three future-dated scheduler stamps — main red through three closed fixes (#3280)
**`check-fnxc-future-dates` exits 1 on `origin/main`.** ``` packages/engine/src/scheduler.ts: 3 future-dated stamps, baseline allows 2 FNXC:ConcurrencyAdmission 2026-08-06-09:00 (six days out) FNXC:WorkflowLifecycleColumns 2026-08-01-05:00 FNXC:WorkflowScheduling 2026-08-01-01:05 ``` All three repointed to `2026-07-31`, times preserved. Gate now exits 0. ## This red has outlived three owners #3270, #3272 and #3274 were each opened against it and each **closed without merging**. Main has been red on this gate for hours while three fixes came and went. Claimed with `check-file-claimed.mjs` before starting — only #3262 touches `scheduler.ts`, and it is a terminal-role refactor rather than a stamp fix, so this was genuinely unowned. ## Why this keeps recurring Seven incidents in roughly two hours. The mechanism, in one line: **the date check runs only in CI** (`pr-checks.yml:66`, no pre-commit or pre-push hook), so every PR is validated against main's baseline *at its own CI time* and cannot see a concurrent or later change. Two PRs stamping the same file both pass, then compose into a red main. One case (#3273) was a stale branch **reverting** an already-merged fix. Patching instances has not converged — this PR is the eighth attempt at the same class. Two structural options, neither of which I am landing unilaterally since the second changes the gate's contract: - run the date check at **author time** (pre-push); it needs no baseline for "is this date in the future", so it cannot be raced - make the date rule **baseline-free** — a future-dated stamp is always wrong, unlike a lifecycle literal that may be a deliberate fallback `2026-08-06` being six days out also suggests these are not off-by-one timezone slips but stamps written from an intended future date. ## Verification - `check-fnxc-future-dates` — **exit 0** (was exit 1 on main) - `scheduler` suites — **148 pass** - `tsc --noEmit` (engine) — 0 errors - comment-only diff, no behaviour change Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
475bb2d641 |
FN-8637: restrict Quick Add Start to manual-intake workflows
Restrict Quick Add Start eligibility to verified manual intake lanes. - Require the server-derived manualIntake flag instead of hold alone. - Preserve Coding Ideas routing while hiding Start for Coding's merged planning lane. - Cover desktop and mobile eligibility behavior and document the updated rule. - Add a patch changeset for the corrected workflow gating. Files changed: .changeset/fn-8637-quick-add-start-manual-intake.md | 7 ++++ docs/dashboard-guide.md | 2 +- packages/dashboard/app/components/QuickEntryBox.tsx | 21 ++++++------ packages/dashboard/app/components/__tests__/Column.test.tsx | 20 ++++++++--- packages/dashboard/app/components/__tests__/ListView.test.tsx | 40 ++++++++++++++++++---- packages/dashboard/app/components/__tests__/QuickEntryBox.test.tsx | 21 +++++++++--- packages/dashboard/app/utils/__tests__/quickAddStart.test.ts | 38 ++++++++++++++++++-- packages/dashboard/app/utils/quickAddStart.ts | 9 ++++- 8 files changed, 128 insertions(+), 30 deletions(-) Fusion-Task-Id: FN-8637 Fusion-Task-Lineage: 9652d7d8-f954-49e8-9a76-a2421654baae Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
911b7f1c31 |
test(engine): memoize identical full-repo census spawns in lifecycle-column-census
The lifecycle-column-census test file spawned the census CLI ~14 times, each parsing every tracked source file to a TypeScript AST (~2s for ~1960 files). Many spawns were byte-identical, deterministic, read-only real-repo scans: the --json census 4x, the plain report 2x, plus a repeated identical --update-baseline tree-sync across the ratchet cases. Memoize each distinct read-only spawn's output (keyed by argv) and reuse the synced baseline JSON, collapsing duplicate full-AST scans without changing any assertion. File wall-time: 30.5s -> 18.6s (-39%). 57/57 tests still pass. Fusion-Task-Id: FN-slow-test-census |
||
|
|
1e7e6baef1 |
fix(fnxc): the gate compared author stamps against ONE machine's calendar — five reds in two hours (#3277)
Root-cause fix for tonight's repeated red `main`, instead of repointing stamps one at a time — **four PRs across three lanes did that in ninety minutes** (#3261, #3269, and my #3263 and #3272, two of which I closed as superseded by concurrent work). ## The defect The fleet writes stamps from **many** machines; this gate evaluates them on **one**. #2941 fixed the case where the author sits **west** of the runner — a correct 5pm-in-California stamp read as "tomorrow" under a UTC comparison — by switching to the runner's **local** calendar. The mirror case was left open, and that is what broke `main`: | commit | landed (PDT) | = UTC | stamp written | |---|---|---|---| | `9094d1640e` | 16:12 | 23:12 Jul 31 | `2026-08-01-00:20` | | `e52da740a5` | 16:32 | 23:32 Jul 31 | `2026-08-01-00:50` | | `3f95c6d53e` | 16:40 | 23:40 Jul 31 | `2026-08-01-01:05` | Those are **neither** the runner's local date **nor** UTC. They are the *author's* local date in a UTC+1 container — and they are **correct** by this project's own convention ("authors write the local date"). The gate, running in PDT, called all three "tomorrow" and reddened `main` for every other lane. ## The fix A stamp is future only if it is ahead of **both** the local and UTC calendar dates. - Accepts both honest directions (author east or west of the runner). - **Preserves #2941**, doesn't revert it — west of Greenwich the local date is the earlier of the pair, so the 5pm-in-California case still passes. - Still catches an invented date: `scheduler.ts`'s `2026-08-06` stamp (six days out) remains counted, and a mutation probe at `2026-09-15` fails the gate. ## AGENTS.md corrected in the same commit It still instructed **`date -u`**, which describes the *pre-#2941* gate. That instruction is now the one that **produces** the failure from any machine east of the runner — I followed it myself earlier tonight and repointed stamps that were already correct. Rewritten to say: write your own local date; the gate accepts anything not ahead of both calendars. ## Baseline Auto-tightened for **37 files** — the gate's no-author drop path. Those allowances were false positives carried since the UTC-only era, so this **strengthens** the ratchet rather than widening it (`scheduler.ts` 2 → 1, keeping the genuinely-invented stamp counted). ## Verification ``` check-fnxc-future-dates green check-inert-sync-lane-conversions green check-lane-wiring green check-sql-column-literals green census --strict green MUTATION: FNXC:MutationProbe 2026-09-15-10:00 → gate fails (real future dates still caught) ``` No changeset: tooling/gate + internal docs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
208c32c970 |
chore(fnxc): re-record the future-dates baseline after the UTC rollover (92 → 64 files) (#3278)
## What Re-records the future-dates baseline after the UTC rollover. **92 → 64 file entries.** Tooling only, no source changes. The gate's own instruction is *"If a count went DOWN, re-record the baseline in the same commit."* UTC is now `2026-08-01`, so every stamp dated `2026-08-01` is dated **today** rather than after it, and **28 files no longer carry any future-dated stamp at all.** ## Why pruning matters more than the number Those 28 files kept a non-zero allowance they no longer need, and **an allowance is a hole a new violation can hide in.** Four separate commits landed a future-dated stamp last evening — in that environment, a stale allowance on a file is exactly where the fifth would go unnoticed. With the entries pruned, the next one in any of those files is caught on the first run instead of being absorbed silently. This is the same direction as #3168 (*"tightens the allowance 1 → 0"*) and #3211, just triggered by the clock rather than by a fix. ## What this is not - **Not a correction to anyone's stamp** — no source file is touched. - **Not a loosening** — no entry increases and no file is added. - The **123 stamps still dated beyond today** (e.g. `2026-08-06`) keep their existing allowances untouched. ``` baseline file entries 92 -> 64 check-fnxc-future-dates rc=0 lint clean ``` ## Related, deliberately not included `scheduler.ts:2258` carries `FNXC:WorkflowScheduling 2026-08-01-01:05` — dated today, one hour ahead of the current clock. I repointed it while preparing this change and then reverted: after the rollover it is no longer a gate violation, and mixing a cosmetic timestamp edit into a baseline re-record would make both harder to review. Noting it so the residual I flagged when closing #3270 does not get lost — it is now an accuracy nit rather than a gate concern. |
||
|
|
95410b5de6 |
FN-8638: add Factory Light dashboard theme
Add a daylight industrial theme that persists across dashboard and desktop startup. - Register Factory Light in persisted theme types, selectors, and bootstrap validators. - Define Factory Light tokens and preview swatches for light and dark modes. - Cover theme registration and rendered token contracts, and document the new option. Files changed: .changeset/fn-8638-factory-light-theme.md | 7 ++ docs/dashboard-guide.md | 3 +- docs/settings-reference.md | 2 +- packages/core/src/types/execution-and-ui.ts | 2 + .../app/__tests__/factory-light-theme.test.ts | 106 +++++++++++++++++++++ .../dashboard/app/components/ThemeSelector.css | 14 +++ .../components/__tests__/ThemeDropdown.test.tsx | 2 +- .../components/__tests__/ThemeSelector.test.tsx | 2 +- .../__tests__/CommandCenterControls.test.tsx | 2 +- packages/dashboard/app/components/themeOptions.ts | 1 + packages/dashboard/app/index.html | 2 +- packages/dashboard/app/public/theme-data.css | 86 ++++++++++++++++- packages/desktop/src/renderer/index.html | 1 + 13 files changed, 223 insertions(+), 7 deletions(-) Fusion-Task-Id: FN-8638 Fusion-Task-Lineage: 3b78bc31-0f03-4299-8f5f-1a69ac7c604a Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
79b08a2e99 |
gate(census): say WHY role and status are not backlog, where the numbers print (#3275)
## The hazard
The column backlog is **0**. The two largest numbers the census prints
are now `ROLE (12)` and `STATUS (185)`, sitting directly beneath it,
labelled only `(not guards)`.
That is a verdict with no reason. For a worker under a directive to
drive a census down — finding the backlog line already at zero and two
bigger numbers underneath — "(not guards)" is thin protection. This PR
puts the reason where the numbers are.
## Why they are genuinely not backlog
Both classify by **receiver**, not by the literal
(`ROLE_RECEIVER_TOKENS` = `role, agentType, agent, lane, capability,
sessionPurpose, surface, purpose, agentRole`; status matches
`/status/i`). A legacy column id next to one of those is a different
domain that happens to share vocabulary with the old board. Sampled from
the current tree, not reasoned:
| site | receiver | what it actually is |
| --- | --- | --- |
| `packages/cli/src/commands/task.ts:529` | `outcome === "archived"` | a
task **outcome** |
| `.../routes/register-chat-routes.ts:894` | `type === "done"` | a chat
**message type** |
| `.../cli-agent/telemetry-hub.ts:304` | `kind === "done"` | a telemetry
**kind** |
| `packages/cli/src/commands/goals.ts:178` | `status === "archived"` | a
**goal's** status |
| `packages/cli/src/commands/mission.ts:145` | `status ===
"in-progress"` | a **mission's** status |
None is a task column, so none has a workflow lane to resolve against.
Converting a goal's `status === "archived"` to a column trait would not
remove a legacy id — **it asks the wrong object for a lane it does not
have**, and the resulting bug would be invisible on the default board
for precisely the reason every inert conversion is. That is 185
opportunities to inject a real defect while a number goes down.
## Output-only, verified
Counts, JSON, baseline comparison and exit codes are untouched:
```
--strict exit=0
json totals: {"column": 0, "role": 12, "status": 185, "deliberate": 150} # byte-identical
```
60 census tests pass (`lifecycle-column-census.test.ts`,
`census-reclassification-message.test.ts`). `lifecycle-columns`,
`move-target-literals`, `inert-sync-lanes`, `quarantine-ledger` all exit
0.
## Provenance
I raised "role/status have no inertness proof behind them" several times
as a reason not to touch them, which was too weak — it implied the work
might be valid pending proof. Rather than leave that hanging I went and
looked. They are not unproven conversions; they are **not conversions at
all**. Correcting my own earlier framing, and putting the finding where
the next person will hit it instead of in a report they will not read.
No changeset — internal tooling.
|
||
|
|
29eb512d57 |
docs(solutions): the general shape — a green that answers a different question (#3273)
Extends the doc merged in #3255 with two more instances of the same pattern, both found this session, **neither involving a ratchet**. Four instances now, from four unrelated directions: | what was read as "pass" | what the green actually meant | | --- | --- | | `node scripts/check-*.mjs` exits 0 | report-only mode — the failure path needs `--strict` | | a census reports 0 for a new file | the file is untracked, so it was never scanned | | a backgrounded `cmd > log; grep …` reports exit 0 | that is `grep`'s status; the suite inside had 8 failures | | a rebased branch's tests pass | the rebase never started, so it ran on the **old** base | The two new ones are worth writing down because they are not about tooling anyone built here — they are about how results are read. **Exit codes belong to the last command in the pipeline.** A backgrounded `run_tests > log 2>&1; echo done; grep X log` exits with `grep`'s status, so the harness reported "completed, exit code 0" for a dashboard suite that had 8 failures. I nearly recorded that suite as green. Read the summary out of the log; never infer a suite's result from a wrapper's exit code. **A failed rebase leaves you on the old base, and the tests still pass there.** `git rebase` refused with `cannot rebase: You have unstaged changes`, so the branch never moved. `git diff origin/main` then listed 20+ files including other workers' commits — which reads exactly like my branch had reverted their work — and a full test run on that tree came back green. Both signals were true about a tree nobody cared about. ``` git merge-base --is-ancestor origin/main HEAD ``` said STALE while the tests said pass. That is the only check that separates the two, and it belongs before any claim of "verified on current main". The shared tell, stated once: **a result too clean, or too alarming, for what changed.** Every probe shape passing including ones that obviously should not; a two-file branch appearing to revert twenty. When the answer does not fit the size of the question, find out what was actually measured before believing it. ## Verification Docs only; no code paths change. `lifecycle-columns`, `move-target-literals`, `inert-sync-lanes`, `quarantine-ledger` all exit 0. No changeset — AGENTS.md excludes internal docs. **Pre-existing red, not from this branch:** `check:fnxc-future-dates` currently fails on main from a `2026-08-01-00:50` stamp in `packages/core/src/task-store/lifecycle-ops.ts` (commit `e52da740a5`) — a timezone-ahead clock writing tomorrow's date, at 23:45 UTC. Already claimed by **#3269 and #3270**, so I have not touched it; flagging only so this branch's CI result is not misattributed. It is the same recurring class this doc's sibling rule addresses: take the stamp from `date -u`, not the local clock. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added guidance for identifying misleadingly successful CI and test results. * Documented checks for report-only runs, untracked files, masked failures, and tests running on an outdated code base. * Included recommendations for reviewing logs and verifying branch ancestry. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
5bf9279c5d |
FN-8636: hide unavailable task card cost badges
Hide dash-only cost badges from board task cards when pricing is unavailable. - Suppress unavailable cost labels and their empty layout shells. - Cover priced and unavailable badges with and without Promote across desktop and mobile widths. - Add a patch changeset for the board-card fix. Files changed: .changeset/fn-8636-card-cost-badge-dash.md | 7 ++ packages/dashboard/app/components/TaskCard.tsx | 8 +- .../__tests__/TaskCard.cost-badge.test.tsx | 93 ++++++++++++++++------ .../app/components/__tests__/TaskCard.test.tsx | 14 ++-- 4 files changed, 84 insertions(+), 38 deletions(-) Fusion-Task-Id: FN-8636 Fusion-Task-Lineage: 31fbf82a-7a67-4629-bf82-48faf3c3a9d7 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
91c3854607 |
fix(fnxc): the last future-dated stamp keeping main red (#3269)
**`check-fnxc-future-dates` exits 1 on `origin/main`.** This is the last stamp causing it. ``` packages/core/src/task-store/lifecycle-ops.ts: 1 future-dated FNXC stamp, baseline allows 0 FNXC:Diagnostics 2026-08-01-00:50 (today is 2026-07-31) ``` Corrected to `2026-07-31-00:50`. One character. `check-fnxc-future-dates` now exits 0; `tsc --noEmit` clean. ## Why this was left behind Four PRs converged on this red main — #3262, #3263, #3265, and my own #3266 (closed as superseded). Between them they covered the census rise and the boundary-work stamps. **None touched `lifecycle-ops.ts`**, so the gate stayed red after the others landed. That is the predictable failure of parallel work on one symptom: everyone fixes the part they saw first, and the residue survives because each author checked "is main green now?" against their own branch rather than against main. ## I claimed before working this time ``` node scripts/check-file-claimed.mjs packages/core/src/task-store/lifecycle-ops.ts → UNCLAIMED ``` Then pushed the branch before editing. I did the opposite on #3266 — built it, then discovered #3265 already covered it — which was the sixth duplication of the phase and my third. The tool answers in one command; the discipline is running it *first*. ## Verification - `check-fnxc-future-dates` — **exit 0** (was exit 1 on main) - `census --strict` — exit 0 (already green; #3265's marker landed) - `tsc --noEmit` (core) — 0 errors - one-character diff, no behaviour change Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
3f95c6d53e |
fix(engine): a Ready card's retained worktree transfers on release instead of blocking it
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
8e6b0ad67e |
test(engine): main is red — the census preconditions were MET, repoint two guards that expired on success (#3260)
## main is red, and this is the second half of it Running the full `engine-default` project on `origin/main` — 754 files, 10,538 tests — returns **3 files / 4 tests failing**. One is the parked-seam audit counter, fixed in #3258. The other three are here. All three assert that lifecycle debt **still exists**. It does not: | assertion | expected | actual | | --- | --- | --- | | `finds >10 literal move targets, so the census is not vacuous` | > 10 | **0** | | `both recoveryRehome groups are non-empty` | > 0 each | **0 / 0** | | `still says ROSE when guards genuinely grew` | exit 1 | **exit 0** (mutation was a no-op) | Nothing regressed. The conversion program drove the engine's literal move-target population to zero and the census baseline to zero entries. **Each guard's premise was "the debt still exists", so each expired the moment the work succeeded — and expired by failing, which reads as a regression in the very thing it was guarding.** The third is the sharpest: it manufactured a rise by finding a baseline entry with more than one guard and zeroing it. With `byFile` empty there was nothing to find, so it mutated nothing, the census correctly passed, and the test asserted exit 1 against a correct pass. ## Repointed, not deleted A vacuity guard must not depend on real debt existing. Two halves: - **Vacuity now runs against a synthetic fixture** — a small in-memory source with three `moveTask` literals (one with `recoveryRehome`, one targeting an undeclared column). The collector is exercised forever regardless of how much real debt remains. This is what keeps the rest honest: at a real population of 0 the zero-assertions are trivially true, and **only the fixture proves they would still fire**. - **The real-tree assertions now assert zero**, so a reintroduced literal move target fails them. Same guarantee as before, pointed at the state the tree is actually in. The ROSE case builds its own one-file tree through the `FUSION_CENSUS_FILE_ROOT`/`FILE_LIST` seam from #3230 rather than borrowing a baseline entry that no longer exists — a rise **constructed** instead of borrowed. It also now asserts the failure is *not* the reclassification wording, which is the distinction that file exists to protect. ## Verification | mutation | expected | result | | --- | --- | --- | | reintroduce a literal `moveTask(id, "in-review")` in the engine | fail | exit 1 ✅ | | blind the collector to return `[]` | fail | exit 1 ✅ | | remove the `ROSE` wording from the census script | fail | exit 1 ✅ | | clean tree | pass | exit 0 ✅ | 60 tests green across the three census suites. All eight ratchets exit 0. Test-only; no changeset. **One honest note on my own method.** My first `ROSE` mutation replaced 1 of the 2 occurrences in the script and the test stayed green — which looks exactly like a dead assertion. It was an ineffective mutation, not a dead test; the manual run still printed `ROSE` from the other occurrence. Re-run against both, it failed. A mutation that does not actually change behaviour proves nothing, and it is worth checking that the mutation landed before concluding the test is dead — the same trap as reading a report-only ratchet's exit 0 as a pass. ## Not in scope `defaultColumnIds()` has a pre-existing type error (`Property 'columns' does not exist on WorkflowIrV1` — union narrowing). Untouched by this PR and the test executes fine; flagging rather than fixing, since it is unrelated to the red. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved census analysis reliability when evaluating guard-count increases and reclassification messages. * Improved detection and classification of literal move targets and declared columns. * Enhanced file path reporting for inputs outside the primary source directory. * **Tests** * Added isolated test scenarios using temporary census data and fixtures. * Strengthened validation of recovery, plain, and declared-column classifications. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
e52da740a5 |
fix(core): stale-orphan-dir skip logs at debug, not warn — steady-state per-sweep noise
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
78d411cfe2 |
fix: main is RED on two gates — record the new fallback, repoint six future-dated stamps (#3261)
`9094d1640e` (globalPause gates every graph node entry) reddened **two** lifecycle gates on main. Both are fixed here, in separate commits. ## 1. The census ratchet went 0 → 2 `isTerminalColumnTask` in `scheduler.ts`: ```ts const flags = columnFlagsForTask(task); if (flags) return flags.complete === true || flags.archived === true; return task.column === "done" || task.column === "archived"; // ← counted ``` **The code is correct.** It resolves traits first and falls back only when the workflow is unreadable. The census counts fallback literals on purpose — *"a fallback literal is still a literal and should go when the trait path becomes unconditional"* — and reports them beside the backlog as already-converted. Its own remedy for a legitimate one is a `DELIBERATE-LITERAL` marker at the site. Recorded rather than converted because **there is nothing to convert to**: a task whose workflow cannot be read has no resolved lane, and treating it as non-terminal would count a finished card's retained worktree against live capacity — the opposite of what the surrounding fix does. Marker sits in the declaration's **leading** comments; an inline one attaches to the wrong node and is silently ignored, which cost a miscount once before. Baseline re-recorded in the same commit, since the census tracks deliberate counts and reports a marker addition as `RECLASSIFIED`. ## 2. The stamp gate was red as well Six files stamped `2026-08-01-00:2x` while UTC was `2026-07-31`: ``` workflow-column-boundary.ts 2 workflow-graph-task-runner.ts 1 workflow-column-boundary-hooks.ts 1 in-process-runtime.ts 5 (allows 4) workflow-column-boundary-capacity.test 1 ``` This checkout is UTC-7, so "just after midnight local" is tomorrow in UTC — the case AGENTS.md documents, which passes `pnpm lint` locally *because* the local clock agrees with what was written. Second occurrence today; I fixed the same shape on #3208 for another worker. Repointed to `2026-07-31-22:2x`, preserving relative order. **Zero non-comment lines changed** — 8 lines across 6 files, verified by diffing out FNXC lines. ## Measured | check | before | after | |---|---|---| | `census --strict` | **1** | **0** | | backlog | **2** | **0** (DELIBERATE-LITERAL 148 → 150) | | `check-fnxc-future-dates` | **1** | **0** | | `pnpm test:gate` | 0 | 0 | | `census-reclassification-message` | 2 failed | **1 failed** | That last row is deliberate: the remaining failure is the expired-premise case #3260 fixes, and I have not touched it. The capacity test from `9094d1640e` still passes 9/9. ## Why this landed at all Both gates run in `pr-checks.yml`, so a PR carrying either would have gone red. Worth someone checking how it merged — a stale merge base would explain it, and if so the same hole is open for the next merge. |
||
|
|
9094d1640e |
fix(engine): globalPause gates every graph node entry; maxWorktrees counts planning/review holders
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
d14294b6cb |
docs(solutions): add the count-based probe, which the report-only trap cannot fool (#3257)
## What Adds one technique to #3255. Docs only. #3255 records that probing a ratchet **by exit code** can read green because the tool is report-only without `--strict` — a real trap that nearly got a healthy gate reported as dead. There is a second technique that sidesteps it entirely and is strictly more informative: **parse the tool's own per-file count.** ```bash node scripts/check-move-target-literals.mjs 2>&1 | grep -a "my-probe-tmp" \ | grep -aoE "^ +[0-9]+" | tr -d ' ' ``` **Immune to the report-only trap** — a report-only run still *prints* the count, so the number moves 0 → 1 whether or not `--strict` was passed. **It measures which shapes, not just whether something fired.** An exit code is one bit for the whole run. Auditing a detector means asking *"of these five spellings, which are seen?"*, and five separate binary runs cannot distinguish **partial** detection from a probe file that failed to compile. The move-target audit read `direct 1 / backtick 1 / ternary 0 / const 0` in a single run, which named the gap immediately. ## Both belong | question | technique | |---|---| | **can this ratchet fail at all?** | `pnpm check:*` — ask this first (#3255 §1) | | **what can it see?** | per-file counts — an exit code is too coarse | I also added a caveat that applies to both: confirm the probe is actually being scanned by watching the tool's **scanned-file total** move. A probe that never compiled and a probe the tool never discovered both report zero hits, and neither is a finding — that one cost me a wasted measurement before I noticed the total had stayed at 1961. ## Why this is worth a follow-up rather than a comment #3255's rule as written — *"use `pnpm check:*`, not a bare `node scripts/...`"* — would have made the shape-coverage audits impossible, since `--strict` collapses five distinct per-form answers into one bit. The rule is right for its question and wrong for the other one, and the distinction is easy to lose once only the rule survives in someone's memory. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added guidance for evaluating ratchets using per-file output counts. * Documented report-only and shape-coverage limitations, count-based versus failure-based checks, and verifying that probe files were scanned. * Included a command example for probing ratchet behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
c8a6af13a0 |
test(census): pin file DISCOVERY, which every existing test was blind to (#3259)
Follow-through on the recommendation I made reviewing #3256: **a gate needs a test for its file discovery, not only its matcher.** ## The gap This suite pinned the matcher and never the scan. Every case either feeds the classifier a source string or drives the CLI against the real tree — so **the file list could return empty and all 53 tests would still pass.** Not hypothetical. `git ls-files` lists tracked files only, so a new file with a plain `task.column === "in-review"` scored 0 until staged (#3254). The identical bug then turned up in the move-target ratchet **behind its own 12 matcher tests** (#3256) — I wrote those 12 specifically to stop that gate regressing, and they could not see it, because they import the matcher and never run a scan. ## Four cases, on a synthetic tree Driven through `FUSION_CENSUS_FILE_ROOT` + `FUSION_CENSUS_FILE_LIST`, so discovery is testable without creating files inside a checkout the operator writes to concurrently: - a guard in a scanned file **reaches the classifier** and is counted - `--strict` fails **for the right reason** (message names the file; not an ENOENT fail-closed) - **every** listed file is counted, not just the first - files are read from the **scan root**, so a listed path and a read path cannot diverge ## The second case earns its wording Its first version asserted only `code === 1` — and **passed while discovery was broken.** With the injected list ignored, paths come from the real repo while reads resolve against the fixture root, every read misses, and the gate fails closed with exit 1. Right code, unrelated cause. A test that cannot tell *"found a guard"* from *"could not read anything"* is not testing the ratchet. Asserting the message is what separates them. I found that only by checking which cases the control actually failed — 3 of 4, not 4 of 4. Had I stopped at "the control fails, ship it", I would have added a test that passes for the wrong reason to a suite whose whole purpose is catching tests that pass for the wrong reason. ## Measured | check | result | |---|---| | suite | **57 passed** (53 + 4) | | anti-vacuity: `injectedList` forced undefined | **all 4 fail** (3/4 before strengthening case 2) | | restored | 57/57 | | `census --strict` / `check-fnxc-future-dates` | 0 / 0 | Tests only — no gate or product change. The same four assertions port directly to the other lifecycle gates once each grows the fixture seam; the move-target ratchet is the obvious next one, and its `.mjs` is currently claimed by #3256. |
||
|
|
f3d7b73741 |
test(engine): main is red — re-record the parked-seam audit at 4-of-6, split by resolution path (#3258)
## main is red `workflow-optional-role-param-caller-audit-live-e2e.pg.test.ts` fails on `origin/main` in `engine-default`: ``` AssertionError: expected 4 to be 2 expect(parkedConverted.length).toBe(2); ``` Found by running the whole live-E2E corpus rather than trusting that it passes — 27 files, 159 tests, 1 red. Not in the merge gate, so it has been sitting there. The alarm fired **downward**, exactly as that file was written to: two more call sites started passing `parkedColumns`, and a counter fails when someone *closes* a gap as well as when someone widens it. ## Why I did not just write 4 Re-recording it at 4 would have laundered an inert conversion through the audit written to catch inert conversions. Walking all six sites before touching the number: | site | `parkedColumns` provenance | verdict | | --- | --- | --- | | `agent-heartbeat.ts:1267` | — | unconverted | | `agent-heartbeat.ts:3796` | — | unconverted | | `self-healing.ts:13184` | `await resolveProjectColumnsForRoles` (:13170) | async-resolved | | `self-healing.ts:13294` | `await resolveProjectColumnsForRoles` (:13293) | async-resolved | | `task-agent-sync.ts:243` | `await resolveLinkSyncColumnRoles` (:225) | async-resolved | | `scheduler.ts:1798` | `resolveTaskParkedColumnsSync` (:1797) | **SYNC — INERT** | `scheduler.ts:1798` resolves through `resolveTaskParkedColumnsSync` → `getTaskWorkflowSelectionImpl`, which is `undefined` for every task under PostgreSQL. The resolver then takes its `!workflowId` branch and returns the **default builtin IR** — not `undefined` falling through to a legacy arm, but a real IR resolving real traits, with full confidence. It answers `hold`/`intake` as `todo`/`triage` on every board, exactly as the literal did. Driven proof: `workflow-scheduler-sync-role-conversion-inert-live-e2e.pg.test.ts`. **The shape count (4) and the live count (3) are different numbers, and only the second is about behaviour.** Both are now asserted, plus the sync-resolved site by name so it cannot quietly become "just one of the four". ## A mistake worth recording, because the test caught it My first draft keyed on `await` appearing inside the call window. The argument is nearly always a variable (`[...driftedParkedColumns]`, `roles.parked`) and the `await` lives in that variable's **assignment**, several lines above. That draft classified all four sites as inert — and it **would have passed** had I written the expected number to match what it measured. It failed only because I asserted 2 live from reading the source first, and the mismatch exposed the detector. Classification is now by provenance: take the root identifier, find where the file assigns it, ask whether *that* is awaited. The same bug recurred in my named-site check and failed the same way. That is the whole hazard of this program in miniature — a source-text audit that measures nothing looks exactly like one that measures everything, and it is the *number you expected* that catches it, not the green. ## Not asserted, deliberately `self-healing.ts:13184` is inert for an unrelated reason: its gate is `hasFreshRun || hasActiveExecution` and never reads `shouldPreserveParkedLink`, so its correctly-resolved set decides nothing today. Its own FNXC note says so. Resolution path is mechanically checkable; "the gate never reads the answer" is not, and asserting it on a string match would produce a number nobody could maintain. Recorded as prose in the header. I also did not touch `scheduler.ts`. It is a real defect, not a deferral, but converting it is not this file's job — it is named in the test so the next person converting it is sent here to move it from the inert list to the live one. ## Verification Mutation-verified — a passing audit proves nothing until it has been seen to fail: | mutation | expected | result | | --- | --- | --- | | convert the scheduler site to the async resolver | fail (3/1 → 4/0) | exit 1 ✅ | | drop `parkedColumns` from a converted site | fail (shape 4 → 3) | exit 1 ✅ | | add a new unconverted caller | fail (calls 6 → 7) | exit 1 ✅ | | clean tree | pass | exit 0 ✅ | Full 27-file live-E2E corpus green (159 tests). Ratchets exit 0. Test-only; no changeset. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Expanded end-to-end audit coverage for workflows with optional role parameters. * Improved validation of caller resolution paths, including asynchronous and synchronous scheduling scenarios. * Updated expectations to reflect all supported conversion paths and strengthened verification of scheduler behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
08a4e418f7 |
fix(dashboard): idle Revising badge explains it is queued for a planning slot
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
37d891e879 |
FN-8633: improve tablet terminal dragging
Give floating tablet terminals a dedicated drag grip while preserving tab-strip panning. - add a touch-sized tablet-only header drag grip and pop-out hit target - preserve floating geometry at the tablet breakpoint and document the gesture - cover grip availability, dragging, and horizontal tab-panning CSS isolation Files changed: .changeset/fn-8633-tablet-terminal-drag.md | 7 ++ docs/dashboard-guide.md | 4 +- packages/dashboard/app/components/TerminalModal.css | 61 +++++++++++++ packages/dashboard/app/components/TerminalModal.tsx | 16 ++++ packages/dashboard/app/components/__tests__/TerminalModal.test.tsx | 99 ++++++++++++++++++++++ 5 files changed, 185 insertions(+), 2 deletions(-) Fusion-Task-Id: FN-8633 Fusion-Task-Lineage: f1c442a8-3302-4f6a-98e9-f1efa4083c12 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
1660b136d7 |
fix(gate): the move-target ratchet could not see a file until it was committed (#3256)
## What **#3254 fixed this blind spot in the census. It was still present here.** Found by re-running that probe against the other four lifecycle gates. No product change. `git ls-files` lists **tracked** files only, so a brand-new file containing `moveTask(id, "done")` scored **0** locally and flipped the ratchet the moment it was staged. The author sees a green gate, commits, and CI disagrees — the worst possible feedback order. It is also the exact shape that made my own first census probe measure nothing while reading as "no gap", which is how the class was found in the first place. Fixed the way #3254 did — `--cached --others --exclude-standard` — plus a dedupe, because a path can appear under **both** flags in some index states and would otherwise count twice against a baseline expecting one. ## Measured ``` untracked probe: 0 detected before -> 1 after --strict on a clean tree: green before and after (no false positives) lint clean; fnxc-future-dates: none added ``` ## The other gates, measured in the same pass | gate | sees untracked files? | |---|---| | `lifecycle-column-census` | ✅ since #3254 | | `check-sql-column-literals` | ✅ already | | `check-inert-sync-lane-conversions` | ✅ already — walks the filesystem with `readdirSync` | | `check-lane-wiring` | n/a — does not use `ls-files` | | `check-move-target-literals` | ❌ → **fixed here** | This was the last gate with the gap. All five now agree about what a file is. ## Correction to #3250 I wrote there that this script *"has no export seam and runs at import"*, and used that to justify shipping without a unit test. **It does have a seam** — an `isEntryPoint` guard — so a test could import it without triggering the scan. That does not change #3250's conclusion (its revert-proof measurement stands on its own), but the stated reason was wrong, and it was wrong in the direction that excused less testing. Correcting it here rather than leaving it as precedent. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Local source-file checks now include newly created and untracked files. * Duplicate file entries are removed when files appear in multiple Git states. * Existing tracked-file and CI scanning behavior remains unchanged. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
9690f46439 |
docs(solutions): probe the instrument the way CI runs it (#3255)
Records two instrument-level defects found this session. Both were in the tools the program uses as ground truth, and both looked exactly like a pass. ## 1. A ratchet that could not fail from the command I typed `check-move-target-literals` is report-only unless given `--strict`, which `package.json` supplies. Probed bare, it returned **exit 0 for every probe** — including a blatant `moveTask(id, "in-review")` pasted into `scheduler.ts`. That is the exact signature of a dead ratchet, and I nearly reported another worker's guard as inert on the strength of it. The guard was fine; my invocation could not fail. What makes it dangerous is the output: a report-only run prints its normal summary line and exits 0, so the terminal is indistinguishable from a genuine pass. ## 2. A ratchet that could not see the file I had just written `lifecycle-column-census` and `check-move-target-literals` discovered files with `git ls-files` — **tracked only** — while the other five walk the filesystem. | new file with a plain legacy guard | result | | --- | --- | | same guard in an already-tracked file | caught | | new file, untracked | **missed, exit 0** | | identical file, `git add`ed | caught, exit 1 | The detectors are fine. The blindness is discovery, and it lands at the one moment the number is consulted: add a helper, check your own work, read zero, commit — and it surfaces later in someone else's CI run, attributed to a push instead of to the edit. The tool was answering about the last commit while being asked about the working tree. ## 3. Why it is worth a doc rather than two one-line fixes Individually these are cheap. Together they cost a day. Because `check-inert-sync-lane-conversions` walks the filesystem and the census did not, the **same probe file** was caught by one and missed by the other. I read that differential as a claim about expression walking and investigated it as one — the real cause was that two instruments in the same program disagreed about which files exist. When the measuring tools disagree about their own domain, every differential between them is unreadable until someone notices. That is the transferable lesson, and it is not visible from either fix alone. ## Status of the fixes - Census discovery scope: **#3254** (open). - Type-assertion blind spot in the sync-lane ratchet: **#3252** (open). - `check-move-target-literals` discovery scope: reported to **#3253**, whose author is already in that file — not touching it. ## Verification Docs only; no code paths change. All eight ratchets exit 0. No changeset — AGENTS.md excludes internal docs. |
||
|
|
b7c7977c09 |
fix(gate): catch cast move-targets, keep ?? fallbacks unflagged, and pin all of it (#3253)
Follow-up to #3250. Two changes, and **one of them is a decision not to widen** — which is the part I would review first. ## Caught now: the cast form ```ts moveTask(id, "done" as ColumnId) // was invisible ``` Columns are typed `ColumnId`, so a cast is the **natural** spelling wherever the parameter is nominally typed. The gate was weakest exactly where this codebase is most likely to write a literal. Cast-wrapping-a-ternary is caught too. ## Deliberately NOT caught: `??` / `||` / `&&` I recommended these arms on #3250. **I was wrong, and the tree proved it.** Adding them flagged: ```ts moveTask(id, (await resolveTaskLifecycleColumns(store, id))?.complete ?? "done", ...) ``` That is the fail-soft idiom this entire programme rests on — resolve, fall back to the legacy id when the workflow is unreadable, exactly as the role helpers degrade. It is the **correct** pattern. A gate that demands a `DELIBERATE-LITERAL` marker on every safe fallback teaches people to add markers by habit, and a habitual marker is how the next real literal walks straight through. So: a legacy id **after** `??` is the safe shape and stays unflagged; a legacy id as the **whole** destination is caught. Backed out, with the reasoning at the site so nobody re-adds it. If you disagree, the counter-argument is that a fallback could mask a lane that should have resolved — but that wants its own report, not this ratchet's exit code. ## Pinned — the gate had no tests at all Fifth spelling missed across three rounds, and every earlier probe was run by hand and thrown away, because the scanner executed on import. Commit 1 makes it importable (behaviour-preserving, `--strict` identical); commit 2 adds **12 tests in both directions**: | catches | does not catch | |---|---| | direct, backtick, ternary, nested ternary, parenthesised, cast, cast-over-ternary | `??` fallback, `\|\|` fallback, resolved destination, substituted template | The negatives are load-bearing, not padding — four of them encode false positives that either shipped or arrived while widening. ## The root cause, recorded in the test header **The destination is a POSITION; every fix so far has enumerated NODE KINDS.** A kind list is something the language extends faster than we guess — I started that pattern myself in #3246 by requiring `arguments[1]` to *be* a literal. The durable defence is that each shape someone finds stays found. ## Measured | check | result | |---|---| | real tree | **0** targets, `--strict` exit 0 (the `??` false positive is gone) | | gate tests | **12 pass / 0 fail** | | anti-vacuity | removing the cast arm **fails** the suite; restoring passes | | eslint / `check-fnxc-future-dates` | clean / 0 | One test corrected itself during writing: I asserted `"drafting"` extracts to `[]`, and it returns `["drafting"]` — legacy filtering is the caller's job. Kept as a test of that split, since folding the vocabulary into the extractor would force every future shape to thread the legacy list. |
||
|
|
78d5efbcaf |
gate: the census could not see a file until it was committed (#3254)
## Why I went looking The fleet directive is to claim the largest census file cluster. There is no cluster — the backlog is **0 guards / 0 files**. So the useful question is whether that 0 is *true*, since the whole phase steers by it. I had just found a blind spot in my own ratchet (#3252), so I probed this one the same way. ## What the probes found A plain, unremarkable guard in a new file scored **zero**: ```ts // packages/engine/src/probe-helper.ts export function g(task: { column: string }): boolean { return task.column === "in-review"; } ``` Not a cast, not an obfuscation — the exact canonical shape the census exists to count. It scored 0 in six different directories, and it scored 0 with every cast variant too, which is what initially made this look like a repeat of #3252. It is not. The same guard pasted into `scheduler.ts` counted immediately (0 → 2 with two probes, casts included). The census walks expressions fine. The miss was **file discovery**: `git ls-files` lists **tracked files only**, so the file did not exist as far as the census was concerned. `git add` it and `--strict` goes to exit 1 on the spot. ## What this does and does not mean **It does not mean the backlog number is wrong.** Everything on `main` is committed, so CI has always seen the whole tree, and I re-confirmed the committed totals are unchanged by this PR: `{"column": 0, "role": 12, "status": 185, "deliberate": 148}`. **Backlog 0 is real.** I want that stated plainly rather than buried, because "ratchet has a hole" invites the opposite reading. **What it does mean** is that the census was blind at the one moment anyone actually consults it. A worker adds a helper, runs the census against their own work, reads 0, commits — and the guard lands, attributed to a push rather than to the edit that introduced it. The instrument was answering about the last commit while being asked about the working tree. ## The fix `--cached --others --exclude-standard`, plus a dedupe (a path can appear under both flags in some index states, which would double every guard in that file). | case | before | after | | --- | --- | --- | | untracked new file with a guard | 0 | **1** | | same file, staged | 1 | 1 (dedupe holds — not 2) | | ignored path (`dist/`) | 0 | 0 (build output still excluded) | | committed tree | 0 | 0 (backlog unchanged) | ## The part worth keeping This also **aligns the scope with `check-inert-sync-lane-conversions`**, which walks the filesystem via `readdirSync` and so always saw untracked files. That mismatch is not cosmetic — it is what made #3252 expensive. The same probe was *caught* by one instrument and *missed* by the other, and I spent a full investigation treating that as a claim about expression walking when part of it was two tools disagreeing about which files exist. When instruments in one program disagree on their own domain, every differential between them is unreadable until you notice. ## Verification - Mutation-verified in both directions on all four cases above. - 53 `lifecycle-column-census.test.ts` tests pass. - All eight ratchets exit 0; `pnpm test:gate` exit 0. - Working tree confirmed clean after every probe. ## What I did not do I did not touch `role: 12` or `status: 185`. Those are different metrics with no inertness proof behind them, and driving them down is a separate unit that needs saying explicitly — a conversion there could be cosmetic and nothing currently would catch it. |
||
|
|
cf4418e3db |
gate: a type assertion hid the sync source — seventh shape of one pattern (#3252)
## What this is #3251 audits the five lifecycle ratchets with staged probes and claims a gap in mine: > `check-inert-sync-lane-conversions` — does NOT catch: a DIRECT `store.resolveTaskWorkflowIrSync(...)` read feeding `resolveLifecycleColumns` I tested it rather than accepting it, and got a **split result**: a probe inserted into the existing `executor.ts` was **caught** (19 → 20, exit 1), refuting the row; a standalone probe file was **missed** (stayed 19, exit 0), confirming it. Two probes of nominally the same thing disagreeing means one of them is describing something else. ## The actual mechanism Instrumenting a copy of the script ruled out the file-discovery explanations: `scanned files: 1850 | probe in list: true`, and the probe's function `isReview` was collected into the sources list. So the file is scanned, the function is tracked, and the guard is still not counted — the loss is downstream, in expression walking. The one syntactic difference between the two probes was a cast. Measured, holding everything else fixed: | argument to `resolveLifecycleColumns(...)` | before | after | | --- | --- | --- | | `store.resolveTaskWorkflowIrSync(id)` | caught (20) | caught (20) | | `store.resolveTaskWorkflowIrSync(id) as never` | **MISSED (19)** | caught (20) | | `store.resolveTaskWorkflowIrSync(id)!` | **MISSED (19)** | caught (20) | | `(store.resolveTaskWorkflowIrSync(id) as any)!` | **MISSED (19)** | caught (20) | So: the direct read **is** tracked. The **cast around it** was not. `unwrapForSyncCall` unwrapped `await`, parentheses, conditionals, binaries and (since #3181) call arguments — but stopped at `as`, `satisfies`, `!` and angle-bracket assertions. **Correction to #3251's row, not a rejection of it.** The gap is real and reproducible; the stated cause ("a direct read is untracked") is not the one operating. That distinction matters for anyone acting on the table: fixing "track direct reads" would have changed nothing. ## The fix One walker clause, alongside the existing `await`/parenthesized unwrap. Real tree unchanged at **19 guards / 3 files, exit 0** — this adds no backlog, it closes a blind spot. ## Why it is the same story a seventh time Inline → membership → cross-module → wrapper argument → census switch/includes → ternary destination → **type assertion**. Across three different tools, the rewrite that hides a guard is the one that changes its *syntactic category* without changing its meaning. Type assertions are the purest case yet: `as`, `satisfies` and `!` are **erased at runtime**. They cannot alter behaviour at all — they can only alter visibility. A guard wearing one is byte-identical in outcome to the same guard bare, and scores as absent. ## Verification - Mutation-verified in both directions: with the fix reverted all three cast forms read 19; with it applied all read 20. - All eight ratchets exit 0: `inert-sync-lanes`, `lifecycle-columns`, `fnxc-future-dates`, `quarantine-ledger`, `move-target-literals`, `inert-flag-seams`, `lane-wiring`, `sql-column-literals`. - `pnpm test:gate` exit 0 (which runs this script since #3136). - Every probe removed; `git status` clean before each measurement. ## What I did not do I did not re-audit the other four ratchets against cast-wrapped probes. #3251's staged-probe method is the right instrument for that and it is that author's file; if the same blind spot exists in the census or the flag-seam checker, it will show up as a cast form scoring zero. Worth one pass by whoever owns those. |
||
|
|
59dfc4678b |
docs(solutions): record what each lifecycle ratchet cannot see, measured (#3251)
## What This note already prescribes: *"Before trusting a ratchet: mutate the shape it claims to catch and confirm it exits non-zero."* This is that checklist item **executed against all five lifecycle gates** on one tree, one staged probe file per form. Docs only. **Two of the five were wrong.** | gate | catches | does NOT catch | |---|---|---| | `lifecycle-column-census` | `===` / `!==` | ~~membership, switch~~ **fixed (#3247)** | | `check-move-target-literals` | direct + backtick destinations | ~~ternary~~ **fixed (#3250)**; still misses a destination bound to a local | | `check-sql-column-literals` | `"column"` comparisons — **including plain template literals**, not only drizzle `sql` tags | nothing; the one miss probed was an identifier the schema never uses | | `check-inert-sync-lane-conversions` | lane reads via the `resolvePlannerLanes` helper | a **direct** `store.resolveTaskWorkflowIrSync(...)` read feeding `resolveLifecycleColumns` — inert by the same mechanism, untracked | | `check-fnxc-future-dates` | future stamps | nothing — it caught this table's author, twice | ## The two lessons the table encodes **A ratchet's blind spot is invisible in exactly the way its subject is.** Both fixed gaps sat next to a printed zero *and a sentence promising nothing could land silently*. The count was true. The sentence was true only for the forms the parser happened to visit. That is the same shape as the conversions this program spent weeks finding — code that looks converted because the instrument cannot see the difference. **Probe correctness is its own trap.** The first census probe measured nothing: the scanner enumerates git-tracked files, the probe was untracked, and the scanned-file count staying flat reads *exactly* like "no gap". A `DELIBERATE-LITERAL` probe likewise read as a broken escape hatch until the marker moved to its own line — mid-expression it attaches to the wrong node, which is the documented gotcha, and it still caught the person who had just written it down. ## Reported, not fixed The inert-sync gap is left open deliberately: it is one narrow shape, the only in-tree instance (`replan-target.ts:95`) is documented, new conversions would use the tracked helper, and that gate has uncommitted work from another worker. Recording it beats editing a file someone else is mid-change on. ``` lint clean; fnxc-future-dates: none added; all five gates --strict green on this tree ``` |
||
|
|
0b30eb4146 |
fix(gate): detect ternary move-target literals, which #3246's ratchet could not see (#3250)
## What #3246 landed a gate holding `moveTask` legacy-literal destinations at zero, printing **"POPULATION EMPTY … keep it empty."** I probed that claim the way #3247 probed the census. It held for two spellings and not a third. | form | before | after | |---|---|---| | `moveTask(id, "done")` | ✅ | ✅ | | `` moveTask(id, `todo`) `` | ✅ | ✅ | | `moveTask(id, ok ? "done" : "in-review")` | ❌ **invisible** | ✅ | The check required `arguments[1]` to *be* a literal. A ternary over two lanes is a natural way to write exactly the destination this gate exists to prevent — and per the gate's own header, a wrong target **throws** at runtime rather than no-opping. ## Measured ``` real repo, before and after: 0 targets, --strict passes (no false positives) ternary probe: 0 on HEAD~1 -> 1 after direct + backtick forms: unchanged DELIBERATE-LITERAL marker: still suppresses (canonical placement) lint clean; fnxc-future-dates: none added ``` ## Two scoping decisions, both probed rather than assumed **Not descending into `??` / `||`.** `moveTask(id, lanes.complete ?? "done")` is the documented degraded arm this program writes deliberately — the shape the lifecycle census classifies as `traitFallback` rather than backlog. Counting it would report correct code as debt. Measured at 0 both before and after. **`const t = "archived"; moveTask(id, t)` is still undetected**, and the comment says so at the site. Resolving it needs symbol/dataflow analysis rather than a shape test, which is a different tool than this file is. Flagged so the next person extends deliberately instead of assuming coverage. ## No unit test, and why The script has no export seam and executes at import, so testing it means extracting one — a refactor of a one-commit-old file, which belongs in its own change rather than folded into a behaviour fix. The revert-proof is the measurement above: the ternary probe reads 0 against `HEAD~1` and 1 against this commit. ## Note to #3246's author I raised these gaps on your PR first and offered to send this rather than assume. Two traps that cost me time on the census extension, in case you take it further: - **A count-unless-excluded rule backfires on this vocabulary.** My first census extension counted `switch (x)` unless the receiver looked like a role/status and reported 7 guards — 6 were `switch (eventName)` / `switch (state)` / `switch (event)`, since event enums routinely carry `case "done"`. Requiring a *positive* column signal was the fix. - **Verify the probe file is git-tracked.** My first probe measured nothing because the scanner enumerates tracked files; the scanned-file count stayed flat and I nearly read that as "no gap." |
||
|
|
1e50b71255 |
fix(engine): reap leaked fn-verify verification worktrees in the temp-dir sweep
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
a20ddf6ed6 |
fix(core): refine + duplicate create into the resolved intake lane, not the deleted triage column
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
3916e062aa |
fix(dashboard-quality): the lane runner could not be asked to run every lane (#3248)
The structural half of #2784. I re-measured its 123 failures on current main and **all four reported lanes are green** (143 / 2010 / 1961 / 5149 / 2103 passing). This fixes the reason nobody saw them. ## The mechanism `pnpm --filter @fusion/dashboard test` sets `stopScheduling = true` on the first failing lane, so the rest never run — and there was **no flag to ask for a full pass**. The report said: ``` [dashboard-quality] skipped 9 lane(s) after first failure ``` Nine lanes with **unknown** status and nine **passing** lanes produce the same absence of failure text. That is how 123 failures accumulated behind one red lane, and it is why the original issue could only be written by running all twelve lanes by hand. ## What changes, and what deliberately does not Fail-fast stays the **default** — fast feedback on a broken lane is right, and changing it would slow everyone for a rare case. - `--all` (alias `--no-fail-fast`) runs every lane and reports every failure. - `runQualityTests({ failFast })` so the behaviour is reachable from a test, not just the CLI. - The skip line now states the consequence and the remedy: lanes were **NOT RUN**, status **UNKNOWN rather than passing**, and `--all` shows the full set. ## Both halves pinned A flag nobody can prove works is the same as no flag: | test | asserts | |---|---| | DEFAULT stops after the first failing lane | `launched === ["one"]`, `skipped: 2` | | `failFast:false` runs all three | `launched === ["one","two","three"]`, `failed === [one, three]` | The second is the load-bearing one: **lane three ran even though lane one had already failed**, and both failures are reported rather than only the first. **Anti-vacuity control:** reverting the `if (failFast)` plumbing fails the second test and only it (`1 failed / 5 passed`); restoring passes `6/6`. ## Scope Runner and its tests only. No lane contents, no vitest configs, no CI workflow — CI already invokes lanes individually, so this changes local behaviour and the shared helper, not what CI runs. eslint clean; `check-fnxc-future-dates` exit 0. Suggest #2784 closes on the measured-green half and links here for the structural half, so the mechanism does not close along with the symptom that exposed it. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added an option to run all quality-test lanes, even when earlier lanes fail. * Added `--all` and `--no-fail-fast` command-line options. * Quality tests now stop on the first failure by default, with clearer output for skipped lanes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
bcaa48390b |
FN-8627: add Sage color theme
Add the Sage palette across persisted dashboard and desktop theme selection paths. - Register Sage in core, dashboard bootstrap, desktop, and selector metadata. - Add dark and light Sage tokens plus independently resolvable swatches. - Cover registration, token, selector, and documentation updates. Files changed: .changeset/fn-8627-sage-theme.md | 7 ++ docs/dashboard-guide.md | 3 +- packages/core/src/types/execution-and-ui.ts | 2 + .../dashboard/app/__tests__/sage-theme.test.ts | 101 +++++++++++++++++++++ .../dashboard/app/components/ThemeSelector.css | 14 +++ .../components/__tests__/ThemeDropdown.test.tsx | 2 +- .../components/__tests__/ThemeSelector.test.tsx | 2 +- .../__tests__/CommandCenterControls.test.tsx | 2 +- packages/dashboard/app/components/themeOptions.ts | 1 + packages/dashboard/app/index.html | 2 +- packages/dashboard/app/public/theme-data.css | 86 +++++++++++++++++- packages/desktop/src/renderer/index.html | 1 + 12 files changed, 217 insertions(+), 6 deletions(-) Fusion-Task-Id: FN-8627 Fusion-Task-Lineage: fd4353b3-1e0c-4c7e-84dd-bcad2815178c Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
4e2f52ce8f |
feat(gate): ratchet move-target literals at zero — #3150's population had nothing holding it (#3246)
Closes the gap I flagged when re-measuring #3150: that population is at **0**, and nothing was holding it there. ## Why this surface has no gate today The lifecycle census parses **comparisons**. A move destination is a call **argument**: ```ts await store.moveTask(id, "in-review"); // never counted by anything ``` #3150 measured 31 of these across four files. They are now 0 — I verified that on current main before writing this — but the comparison backlog drifted **787 → 854** during the window its own ratchet was unwired, and this population never had one. ## The failure mode is louder than the guards' A wrong lane **guard** silently answers "no". A wrong move **target** is rejected by `moveTaskInternal` with `TransitionRejectionError: unknown-column` — so on a board that renamed its review lane, every task finishing implementation **threw** instead of reaching review. Loud at runtime, invisible to any test on the default board. ## AST, not grep — and that is measured, not stylistic | scan | result | |---|---| | comment-naive grep of `self-healing.ts` | 1 hit — **JSDoc prose**: `* could call moveTask("in-review")` | | #3150's own SQL survey by grep | 37 hits against **12** real sites (25 comments) | Comments are not AST nodes, so that false-positive class cannot occur here in either direction. ## Controls — all four run, because a gate that only reports 0 proves nothing | probe | expected | got | |---|---|---| | real `moveTask(id, "in-review")` injected | fail | **exit 1**, names the file | | identical call as JSDoc prose | pass | **exit 0** (AST ignores comments) | | legacy target + leading `DELIBERATE-LITERAL` | pass | **exit 0** (marker honored) | | probe removed | pass | **exit 0** | The third is the #1411 `recoveryRehome` safe-landing path, where the legacy id genuinely *is* the target. Marker must be **leading** — the census already learned that an inline marker attaches to the wrong node and is silently ignored. ## Ratchet semantics match the census Fails on a **drop** as well as a rise. A stale allowance is a hole a re-added target can return through while the gate stays green — exactly what let the comparison baseline drift. ## Measured | check | result | |---|---| | this gate | scans **1816** files, reports **0** | | `check:lifecycle-columns` / `check:sql-column-literals` | 0 / 0 | | `check:fnxc-future-dates` / `check:lane-wiring` | 0 / 0 | | eslint / `pnpm test:gate` | clean / exit 0 | Wired into `pr-checks.yml` beside the sibling ratchets, named to match ("Move-target ratchet"). ## Scope Gate only — **no production code touched**, and no conversions in this PR. The population was already empty; this makes "31 → 0" an invariant instead of a snapshot, which is the caveat I attached when recommending #3150 for closure. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Quality Improvements** * Added automated validation for task-movement configuration values. * Pull request checks now detect unexpected changes in tracked values. * Added baseline tracking with strict validation to identify both additions and removals. * Added support for explicitly documenting intentional exceptions. * Improved reporting for file-discovery and source-reading failures. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
301bd8ed1e |
fix(census): detect membership and switch column guards, which could land silently (#3247)
## What
The census prints **"a new guard cannot land silently"** next to a zero.
That claim was true only for the guard form it happened to parse. This
closes the two it could not see. No product change.
The comparison walk visits `BinaryExpression` only, so neither of these
was visible:
```ts
["done", "archived"].includes(task.column)
switch (task.column) { case "todo": ... }
```
Both are lifecycle-column guards by any reading.
## How I found it
By applying this program's own rule — **break the guard on purpose** —
to the guard itself. I staged a probe file with five guard forms and
measured which moved the count:
| form | counted before |
|---|---|
| `t.column === "todo"` | ✅ |
| `t.column !== "in-review"` | ✅ |
| `["done","archived"].includes(t.column)` | ❌ |
| `switch (t.column) { case "triage": }` | ❌ |
| SQL string `"column" = 'done'` | ❌ (separate gate owns this) |
A worker converting a `===` chain into an array membership would have
scored the conversion **and kept the guard**.
*(The first probe run was itself invalid — the file was untracked and
the census enumerates git-tracked files, so the scanned count stayed at
1961 and nothing was measured. Staging it moved the scan to 1962.
Checking the scanned count is what caught that.)*
## The near-miss worth reading
My first implementation counted **unless** the receiver looked like a
role or status — mirroring the `===` walk. On the real tree it reported
**7 column guards**, and I nearly published that as a hidden backlog.
Six were false: `switch (eventName)`, `switch (state)`, `switch (event)`
— event and state enums routinely carry `case "done"` / `case
"archived"`. Landing it would have injected six phantom guards into a
backlog the ratchet treats as zero, and `--strict` would then have
**failed every other worker's PR**.
So the new walks require a **positive** column signal instead. That
regression is pinned by a test asserting all three receivers stay
uncounted.
## Measured
```
real repo, before and after: COLUMN guards 0, STATUS 185 (no false positives)
staged probe: 2 detected before -> 4 after
new tests: 6/6 pass; 3 FAIL with the extension reverted
existing lifecycle-census test: 9/9 still green
lint clean; census --strict passes; fnxc-future-dates: none added
```
## Known limit, stated rather than left to be discovered
The positive signal is the receiver **name**, so `switch (column.id)` —
a `Column` object rather than a task's column — is **not** counted. That
is a real guard shape and it is deliberately out of scope: widening to
reach it is exactly what produced the six false positives, so it needs
its own discrimination rather than a looser regex. Flagged here so the
next person extends it deliberately instead of assuming coverage.
## Why this and not another conversion PR
The conversion queue has been genuinely empty for several cycles —
census 0, 116 resolver sites unchanged across four commits, every site
blinded and pinned. The remaining risk in this program was never another
literal; it was that **the instrument defining "done" could not see two
of the shapes it claims to protect against**. A zero from a detector
with blind spots is the exact failure this phase has spent its time
documenting.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added lifecycle-column guard detection for array membership checks and
`switch` cases.
* Recognizes supported column receiver names and classifies findings
consistently with existing guards.
* Ignores status, event, and state receivers, and avoids duplicate trait
fallback findings.
* **Tests**
* Added coverage for membership checks, `indexOf`, `switch` guards, and
deliberate-literal suppression.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
46d5019e2d |
FN-8631: remove task card bottom whitespace
Make progress-bearing task cards use their content height without an unused trailing band. - Remove the fixed minimum height from the task-card steps toggle. - Cover trailing-row layout across desktop and mobile task-card variants. - Add a patch changeset for the visual layout fix. Files changed: .changeset/fn-8631-task-card-bottom-space.md | 7 ++ packages/dashboard/app/components/TaskCard.css | 8 +- .../app/components/__tests__/TaskCard.test.tsx | 140 +++++++++++++++++++++ 3 files changed, 153 insertions(+), 2 deletions(-) Fusion-Task-Id: FN-8631 Fusion-Task-Lineage: 408d359f-66ed-4510-8974-3debbf76860f Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
cde02b423d |
FN-8632: align Command Center concurrency controls
Align Command Center capacity controls so their slider tracks remain visually synchronized. - Use a two-column grid for the surviving per-project capacity sliders. - Stretch slider cards and bottom-align range inputs despite optional running-count captions. - Add regression coverage and a patch changeset for the layout correction. Files changed: .changeset/fn-8632-concurrency-layout.md | 7 ++++ .../command-center/CommandCenterControls.css | 22 ++++++---- .../__tests__/CommandCenterControls.test.tsx | 47 +++++++++++++++++++++- 3 files changed, 67 insertions(+), 9 deletions(-) Fusion-Task-Id: FN-8632 Fusion-Task-Lineage: c59f52fc-0e5b-4633-98fa-64b8a60621d0 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
478b15d7ec |
docs(solutions): add the CI failure-rate method, and a fourth instance (#3244)
## What Follow-up to #3243. That note said *"take a second measurement of a different kind"* — true, and useless at 2am without the technique. This adds the one that actually settled every case, plus a fourth instance that occurred after #3243 was written. Docs only. ## The technique Enumerate recent failing CI runs and compute a **per-file failure rate**. Seven runs separated three populations that are indistinguishable from a single local run: | rate on CI | meaning | action | |---|---|---| | **7/7** | consistent, real | fix, or diagnose and hand off with evidence | | **1/7** | intermittent | flake or race; two in one subsystem is a product-race smell | | **0/7** (fails only locally) | environment | fix your sandbox, change **nothing** in the repo | Measured on this repo's main while writing it: `planning-browser-e2e` **7/7**, `postgres/schema-applier` **1/7**, `report-store.pg` **1/7**. ## The fourth instance #3243 documented three reversals. A fourth happened after it merged: a component test with **2 failing cases locally, 0/7 on CI**. That makes **three separate local-only failures in a single session** — a model-routes test hanging offline, a component test with four failing cases, and a set of assertions I was ready to call a regression. Each felt like a finding. All three were my sandbox. That is frequent enough to be a habit rather than bad luck, which is why it is worth a row in a table rather than a mention. ## The cost asymmetry, which should drive the default Acting on a **0/7** by quarantining **deletes coverage that is green everywhere else**. Acting on a **7/7** by investigating costs an hour. The errors are not symmetric, so when unsure which row you are in, the cheap move is always more samples from the *other* environment — not more confidence about the one you have. This is the concrete form of the point the standing quarantine rule already encodes with *"without a corresponding real bug"*: **"I saw it fail" is not that clause**, and the failure-rate table is how you tell the difference before acting. ``` lint clean; fnxc-future-dates: none added (exit code checked before piping) ``` |
||
|
|
f86d758f9b |
FN-8630: balance Task Detail scrollbar insets
Keep Task Detail content symmetrically inset when its body scrolls. - Reserve stable scrollbar gutters on both inline edges of the scrollable detail body. - Add deterministic coverage for modal, pop-out, and embedded detail inset symmetry. - Publish a patch changeset for the layout correction. Files changed: .changeset/fn-8630-task-detail-right-padding.md | 7 + .../__tests__/task-detail-inset-symmetry.test.ts | 222 +++++++++++++++++++++ .../dashboard/app/components/TaskDetailModal.css | 15 ++ 3 files changed, 244 insertions(+) Fusion-Task-Id: FN-8630 Fusion-Task-Lineage: 9fd0c2bd-3370-4f86-ad12-9f06e5172c5b Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
5365746d37 |
docs(solutions): record "one sample is not a diagnosis" (#3243)
## What A `docs/solutions` note recording three diagnoses I reversed **in one session**, all wrong the same way. Docs only. ## The three | observed | my story | what it was | |---|---|---| | `planning-browser-e2e` fails at width **769**, passes at **768** | layout regression at the tablet breakpoint, from FN-8606 | a **race** — 5 passes in 6 runs; on every pass the control sits inside the viewport at 769 (`right: 753 ≤ 769`) | | a model-routes test fails **3 of 3** locally | red on main; quarantine candidate | **green on CI**; a sandbox interaction. The fixture is configured offline, so a sandbox should not have changed the outcome — the tell was there from run one | | one approach could not cover a resolver | the site is **unpinnable** | a *different shape* covered it — a helper that **resolves** rather than one that **receives** | Each was plausible, mechanistic, and consistent with the evidence I had. That is what made each dangerous: **a diagnosis that explains your one data point feels finished.** Each survived exactly until a second measurement **of a different kind** — another environment, more samples, an instrumented probe. Re-running the same command is not a second measurement. ## The reusable part | observation | tempting story | check first | |---|---|---| | fails at boundary X, passes at X−1 | structural bug at the boundary | run it 5 more times — boundaries are where races surface | | **consistent** locally, green on CI | main is broken | the environment; consistency is not universality | | **intermittent** locally, consistent on CI | flaky test | a race the slower runner loses every time | | one approach failed | the site cannot be done | whether a different *shape* of the approach works | ## Why it matters beyond debugging hygiene Two of the three would have caused real damage if acted on: - Quarantining the model-routes test — the action the standing rule seems to license on "observed failing" — would have **deleted coverage that is green everywhere else**. The rule's *"without a corresponding real bug"* clause is load-bearing, and a local observation does not satisfy it. - "Unpinnable" hardened a single failed approach into a property of the site. Left standing, it becomes a permanent excuse not to look — the same failure I corrected in an inherited note earlier today, which had recorded four resolvers as unmeasurable for environment reasons that did not hold here. Hence the last rule: **record cautions as environment-scoped, not as properties of the code.** Say where you measured. ``` lint clean; fnxc-future-dates: none added (exit code checked before piping) ``` |
||
|
|
24ef266e48 |
FN-8628: add Factory Dark dashboard theme
Add a low-light industrial dashboard color theme with first-paint support and release documentation. - Register Factory Dark across persisted theme types, selector metadata, and desktop/dashboard bootstrap validators. - Define dark and light Factory Dark tokens, swatches, and selector styling. - Cover theme registration, tokens, bootstrap behavior, and UI theme-option counts. - Add a minor @runfusion/fusion changeset and document the theme. Files changed: .changeset/fn-8628-factory-dark-theme.md | 7 ++ docs/dashboard-guide.md | 3 +- docs/settings-reference.md | 2 +- packages/core/src/types/execution-and-ui.ts | 2 + .../app/__tests__/factory-dark-theme.test.ts | 106 +++++++++++++++++++++ .../dashboard/app/components/ThemeSelector.css | 14 +++ .../components/__tests__/ThemeDropdown.test.tsx | 2 +- .../components/__tests__/ThemeSelector.test.tsx | 2 +- .../__tests__/CommandCenterControls.test.tsx | 2 +- packages/dashboard/app/components/themeOptions.ts | 1 + packages/dashboard/app/index.html | 2 +- packages/dashboard/app/public/theme-data.css | 86 ++++++++++++++++- packages/desktop/src/renderer/index.html | 1 + 13 files changed, 223 insertions(+), 7 deletions(-) Fusion-Task-Id: FN-8628 Fusion-Task-Lineage: 6f3c7cd9-0130-482d-8aa8-ca47d48b134f Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai> |
||
|
|
851369a480 |
docs(solutions): record "silence is not success" (#3241)
## What A new `docs/solutions` note recording a failure that hit **three different tools in one session**, each time reading as a pass. Docs only. ## The three costumes | what happened | looked like | was | |---|---|---| | `git stash --keep-index` swept the new test file out of the tree | "45 passed" | the pre-existing count; the new test never ran | | a blinding script hit an unmapped role and `sys.exit(2)` **with no message**; `&&` skipped the check, `;` let the run proceed | "375/375 green under blinding" | nothing blinded — run was against unmodified source | | a gate piped to `tail -1`, printing a blank line | "gate ran, no complaints" | exit code 1; the FNXC stamp check had failed, and **CI caught it in #3238** | ## Why it deserves its own note **A passing run and a run that never happened produce the same evidence: no failure text.** Every other bug announces itself; this one is defined by the absence of an announcement. The instinct that catches ordinary bugs — *"nothing looks wrong"* — is precisely the instinct that certifies this one. It gets worse under automation, where output is piped and skimmed. `| tail -1`, `| grep "Tests"`, `>/dev/null 2>&1` all discard the part that would have said `No test files found` or `command not found`. ## The five rules, each paid for above 1. **Assert the exit code before any pipe.** A pipeline's status is the *last* stage's — `cmd | tail -1` reports `tail`'s success, never `cmd`'s. 2. **Confirm the run did the work.** "Test Files 1 passed" when you expected 16 is a finding, not a pass. 3. **A tool that can no-op must say what it did** — print the substitution and location, fail loudly where it cannot act. 4. **Verify the mutation, not the tool's promise** — `git diff --stat`, not the exit code. 5. **Break the guard on purpose once** and watch it fail. A guard never observed failing has not been shown to work — the standard this repo already applies to product ratchets, turned on your own verification. ## The uncomfortable part, kept in The third instance was a rule **I added to AGENTS.md myself in #3174**, broken for the second time. I ran the gate. I read `tail -1`. I moved on. Writing a rule down does not make you follow it. The only reason it was caught is that **CI read the output when I did not** — an argument for the gate existing, not for me having been careful. Cross-linked from the resolver-audit note, whose every wrong reading came from a run that never happened rather than from the blinding itself. That connection is the point: I spent this session auditing a program whose subject is defects hiding behind green results, and reproduced the same class three times in my own tooling. ``` lint clean; fnxc-future-dates: none added (exit code checked before piping this time) ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added workflow guidance explaining why silent or seemingly successful output does not confirm that a test, script, or validation gate ran. * Documented verification practices including checking exit codes, work counts, no-op detection, post-run changes, and intentional failure checks. * Added a case study highlighting how filtered output can conceal verification failures. * Added cross-references connecting resolver interpretation, test execution, and conversion coverage. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |