Skip to content

Audit remaining tools/ TypeScript files (#225 Phase 2)#240

Merged
kui merged 1 commit into
masterfrom
claude/issue-225-audit-tools-bundle
Jul 12, 2026
Merged

Audit remaining tools/ TypeScript files (#225 Phase 2)#240
kui merged 1 commit into
masterfrom
claude/issue-225-audit-tools-bundle

Conversation

@kui

@kui kui commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

Phase 2 for #225: audit all remaining tools/ TypeScript files in one sweep (17 files, 109 flagged comments). Drops the corresponding 17 entries from EXCLUDED_PATHS.

Coverage

File Violations Treatment summary
tools/lib/symbol-chars.ts 19 File-top preambles + trailing range labels folded into JSDoc tables on SYMBOL_RANGES and EXTRA_CODE_POINTS
tools/lib/ico.ts 12 Trailing field-offset labels replaced by a single JSDoc struct table on buildIco
tools/generate-prefab-properties-jsons.ts 12 Function preambles → JSDoc on extractMeshSizes, parseYOffset, extractDensityScores, extractDistrictColors; one in-body WHY: on the zero-footprint skip
tools/generate-font-subsets.ts 11 Job-config preamble → JSDoc on JOBS; in-array note reshaped as one-line WHY:; countGlyphs preamble → JSDoc
tools/generate-glyph-markers.ts 9 Field notes and marker-job preamble → JSDoc; in-array notes reshaped as one-line WHY: each
tools/extract-added-prefabs.ts 8 9-line VERSIONS preamble folded into JSDoc on the const
tools/lib/utils.ts 8 Three function preambles → JSDoc on vanillaDir, compactStringify, collapseLeafArrays
tools/verify-steel-wrench-filter.ts 7 Four filter-condition notes rewritten as single-clause WHY: each; two section markers (// Compare etc.) deleted
tools/lib/prefab-files.ts 6 Suffix-order note reshaped as INVARIANT: on PREFAB_SUFFIXES; ignored-XML predicate note → JSDoc
tools/bench-prefab-filter.ts 4 File-top summary → JSDoc block; structuredClone rationale → one-line WHY:
tools/copy-map-files.ts 3 WORLD_CONCURRENCY preamble → JSDoc
tools/build.ts 3 // Keep alive deleted; serve-static regression note (issue #202) kept as one-line WHY:
tools/print-png-pixel-stat.ts 2 Two-line packing rationale → single-line WHY:
tools/generate-labels-jsons.ts 2 Two-line pre-grouping rationale → single-line WHY:
tools/print-tts.ts 1 Section marker deleted
tools/generate-prefab-html.ts 1 // No jpg in ENOENT branch deleted
tools/generate-favicon.ts 1 One-line comment converted to inline JSDoc on SIZES

Style

All new markers are single-clause sentences (or period-split two-sentence) with because / so / since for causation. No ;, , colon-elaboration, or parenthetical elaboration on prose per the memo established in #235 / #236 review.

tools/lib/prefab-html.ts, tools/lib/xmls/* and the binary parsers were audited in earlier PRs (#238, #235, #239).

Test plan

  • deno task ci:lint passes
  • deno task ci:fmt-check passes
  • deno task ci:type-check passes
  • deno task test — 41 tests / 241 steps pass

Progress

EXCLUDED_PATHS: 65 → 48. tools/ is now fully audited.

Phase 2 for #225. All 17 remaining tools/ files, 109 flagged comments.
tools/ is now fully audited.

Declaration-level rationale moved to JSDoc across binary format tables
(ico), Unicode range tables (symbol-chars), field-tuning marker
configs (glyph-markers, font-subsets), function preambles in the JSON
generators, and helper utilities.

In-body rationale rewritten as single-clause WHY: / INVARIANT: markers:
- verify-steel-wrench-filter: four filter-condition explanations.
- prefab-files: suffix ordering INVARIANT.
- generate-labels-jsons, print-png-pixel-stat, generate-prefab-
  properties-jsons, bench-prefab-filter, generate-font-subsets,
  generate-glyph-markers: various WHY: on specific choices.
- build.ts: serve-static exists because esbuild's serve drops response
  bodies under CI load (issue #202).

Deleted where variable names, guard structure, or test title already
conveyed the intent (Keep alive loop, No jpg ENOENT catch, section
markers, restated pass-through labels).

Style: single-clause sentences using because / so / since for
causation, no ; / — / colon-elaboration per the #235-#236 memo.

EXCLUDED_PATHS shrinks from 65 to 48.
@kui
kui merged commit 33e25c6 into master Jul 12, 2026
2 checks passed
@kui
kui deleted the claude/issue-225-audit-tools-bundle branch July 12, 2026 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant