You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tools: HF-24 close 7 review findings from A+C parallel review
Addresses the must-fix + should-fix findings from the parallel
code-review-quality (A) and sherlock-review (C) passes on PR #1665.
**P0 — `tryAccountingFormat` sign-loss bug** (A's only must-fix bug):
docs adapter `customStringifyCurrency` in `currency-handling.md`
mis-rendered negative values when the negative section was plain
`$#,##0.00` (no parens). `Math.abs(value)` was formatted without ever
adding the `-` prefix, so `value = -1234.5` against format
`"$#,##0.00;$#,##0.00"` returned `$1,234.50` (positive-looking) instead
of `-$1,234.50`. New branch: `parenMatch ? "(" + formatted + ")" : "-" + formatted`.
Regression test for this path landed in hyperformula-tests `85979a0`.
**`extract-doc-snippets.js` hardening** (C's main concerns):
- Detect malformed `<!--snippet:NAME-->` markers (no spaces around the
body) and fail loudly instead of silently skipping. Pre-fix, a typo
in a docs author's marker meant the snippet was silently dropped from
`test-utils/snippets/` while `snippets:check` still passed — drift
undetected.
- Skip symbolic links during `docs/` recursion (loop / sandbox-escape
guard).
- Cap recursion at `MAX_DEPTH = 8`.
- Sort `readdirSync` output for deterministic generated content across
platforms (CI-determinism, no more "works on my Mac" drift).
- Prune orphan `*.generated.ts` files when a snippet is renamed or
removed (otherwise rename leaves a tracked stale file behind, which
`snippets:check` still treats as drift-free because it just looks for
new diffs).
- Render generated file with a `// @ts-nocheck` pragma so the body
(verbatim untyped JS from the docs snippet) doesn't block the
TypeScript compile when consumed.
- Extra blank line between banner and content for grep-friendliness.
**CI ordering** (A's should-fix): `npm run snippets:check` now runs
AFTER `npm run lint` in `.github/workflows/lint.yml` — an extractor
crash on a future malformed marker no longer masks a real lint failure
as a docs-tooling failure.
**tsconfig.test.json**: `test-utils` added to `include` so the
generated snippet IS in the test build graph (combined with
`@ts-nocheck`, the file is reachable for `import` without breaking
compile).
Together these close findings B5 (duplicate-reply pattern is documented
in memory as part of the same review), plus all the should-fix items A
and C surfaced on the codegen MVP. The follow-up A path (expand docs
adapter so the test inline copy can be replaced by an `import` from
`test-utils/snippets/currency-adapter.generated`) remains a product
decision for Sequba and is tracked in [[project_hf_24_followups]].
0 commit comments