Skip to content

#1208 Clear the visualizations lint violations and retire six rule deferrals - #1213

Merged
williamthorsen merged 9 commits into
mainfrom
1208
Aug 6, 2026
Merged

#1208 Clear the visualizations lint violations and retire six rule deferrals#1213
williamthorsen merged 9 commits into
mainfrom
1208

Conversation

@williamthorsen

@williamthorsen williamthorsen commented Aug 6, 2026

Copy link
Copy Markdown
Owner

What

Fixes a subset of deferred lint violations in the factory workspace package and restores the severity of the associated rules to "error" when a strict-lint check is run.

Why

Factory capped eleven lint rules at warn, which also stopped strict lint from re-promoting them, so a
violation of any of them could land in the package without failing a check. Two thirds of the backlog sat
under one directory, which meant clearing it alone was enough to restore error-level enforcement for six of
the eleven rules.

Details

♻️ Refactoring

  • Deleted the four deprecated catwalk dimension aliases (CATWALK_Y, GROUND_Y, CHUTE_TOP, CHUTE_BOT).
    demos/catwalk/ declares its own copies and is unaffected.
  • Extracted the killed-actor suppression that both choreographers carried byte-for-byte into
    visualizations/shared/run-animation-suppressing-errors.ts, an awaiting wrapper that replaces eight
    .catch() chains.
  • Converted the three scenes' promise chains into async private methods, collapsing CatwalkScene's and
    FactoryFloorScene's buffered-diff drain from a pair of duplicated handlers into one unconditional call.
  • Replaced the module-level let bindings in both sprite loaders with never-reassigned const containers,
    and rewrote office-sprite-loader's .finally() chain as an awaiting wrapper that keeps the shared
    in-flight slot's release exactly once.
  • Shared one sprite-load helper across all three scenes, parameterized by failure message so each scene
    keeps its own log text.
  • Hoisted the repeated orchestrator !== undefined guards in both applyImmediate functions, swapped
    pure-read operand pairs in the mappers, and replaced || membership chains with module-level Sets.

🧪 Tests

  • Added unit tests for the shared animation wrapper covering the suppressed, logged, and non-Error
    rejection paths, and for the shared sprite-load helper.
  • Added two CatwalkScene tests covering the buffered-diff drain after both a resolved and a rejected
    choreography.
  • Retargeted the dimension assertions at the surviving RAIL_Y and GROUND_LINE_Y, and converted the
    deferred-promise scaffolding to Promise.withResolvers().

⚙️ Tooling

  • Retired six entries from factory's deferred-lint list, leaving the five rules that still have violations
    elsewhere in the package.

Closes #1208

Nothing consumed the removed aliases; the catwalk layout already derives its geometry from the live reference surfaces.
A diff buffered during choreography reaches the scene from a single path, whether the choreography succeeded or failed.
Phase and status membership tests read from sets, the orchestrator's home-zone branches collapse into one condition, and each corridor door is declared beside the guard that checks it.
Excalibur entity children are read with `.at(0)` rather than the DOM-specific accessor the rule suggests, which those objects do not have.
Six rules return to error severity in factory: `@typescript-eslint/no-deprecated`, `unicorn/better-dom-traversing`, `unicorn/no-declarations-before-early-exit`, `unicorn/no-duplicate-if-branches`, `unicorn/prefer-includes-over-repeated-comparisons`, and `unicorn/prefer-simple-condition-first`.
Each of the eight call sites states at a glance that a failed animation cannot break the choreography sequence.
Each scene kicks off its sprite load with a single call, taking its own loader and failure message; the catwalk and factory-floor scenes no longer carry byte-identical copies of the method.
@williamthorsen williamthorsen added refactoring Improvement to code without change in functionality scope:factory labels Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Dependency audit

Production dependency audit passed.

@williamthorsen williamthorsen self-assigned this Aug 6, 2026
@williamthorsen
williamthorsen marked this pull request as ready for review August 6, 2026 04:03
@williamthorsen
williamthorsen merged commit a29faba into main Aug 6, 2026
3 checks passed
@williamthorsen
williamthorsen deleted the 1208 branch August 6, 2026 04:12
williamthorsen added a commit that referenced this pull request Aug 7, 2026
…ssembly-mcp-v0.2.4 codeassembly-v0.6.0

codeassembly-v0.6.0
- #794 feat: Guide kb-add note placement with the store's declared taxonomy (#1223)
- #1111 feat: Declare which harnesses sync targets (#1221)
- #1214 feat: Allow an artifact to belong to more than one collection (#1219)
- #1186 drop!: Dissolve `common-mistakes` into its consumers' guidance (#1217)
- deps: Upgrade all deps to latest version
- #1203 fix: Bar acceptance-criteria revision prompts to genuine conflicts (#1212)
- #1196 feat: Add the .kb/taxonomy.yaml format with drift reporting and back-fill (#1210)
- #1165 feat: Make a vetted subset of the library declarable (#1207)
- #1197 feat: Report the retired `harnesses:` frontmatter key from `validate` (#1204)
- #963 feat!: Rename the harness id to rovo and qualify the frontmatter key (#1199)
- #1188 drop!: Retire the bundled Bitbucket inline-comment script (#1198)
- #1187 feat: Gate the boolean prefix on a test and add the tail rule it rests on (#1195)

factory-v0.2.4
- deps: Upgrade all deps to latest version
- deps: Upgrade all deps to latest version
- #1209 refactor: Clear factory's remaining lint violations and retire both deferral lists (#1216)
- #1208 refactor: Clear the visualizations lint violations and retire six rule deferrals (#1213)

kb-v0.4.0
- #794 feat: Guide kb-add note placement with the store's declared taxonomy (#1223)
- #1196 feat: Add the .kb/taxonomy.yaml format with drift reporting and back-fill (#1210)

codeassembly-lifecycle-v0.3.0
- #963 feat!: Rename the harness id to rovo and qualify the frontmatter key (#1199)

codeassembly-mcp-v0.2.4
- #1206 refactor: Retire fleet's lint deferrals (#1211)
- #1200 tooling: Retire mcp's lint deferrals and prune the dead root entries (#1205)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Improvement to code without change in functionality scope:factory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

factory: Fix lint violations and remove lint rule downgrades (part 1)

1 participant