-
Notifications
You must be signed in to change notification settings - Fork 1
ts(B-0086): port 1 backlog script (.sh→.ts) — slice 12 of TS/Bun migration #885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -411,7 +411,27 @@ Per-port pattern checklist: | |||||
|
|
||||||
| Slice 6 passes audit. No new patterns recorded — all reused from prior slices. | ||||||
|
|
||||||
| ## Slice 11 — 2 ports (skill-catalog cluster + nuget audit) (PR pending — `lane-b/ts-bun-slice-11-dv2-frontmatter-backfill-2026-04-30`) | ||||||
| ## Slice 12 — 1 port (backlog index regenerator) (PR pending — `lane-b/ts-bun-slice-12-backlog-generate-index-2026-04-30`) | ||||||
|
|
||||||
| **Slice files**: | ||||||
|
|
||||||
| - `tools/backlog/generate-index.{sh→ts}` (regenerates `docs/BACKLOG.md` from per-row `docs/backlog/P<tier>/B-<NNNN>-<slug>.md` files) | ||||||
|
|
||||||
| **Comparison points**: identical to slice 11/10/9. Within Gate B 30-day window. | ||||||
|
|
||||||
| ### Code-pattern audit (per-port) | ||||||
|
|
||||||
| - **`generate-index.ts`** (217 → 282 lines): bash awk frontmatter parser (state machine + `gsub` for quote-stripping) → `extractField` + `stripQuotes` helpers; one `RegExp.exec` per known field; bash `find -name 'B-*.md' -type f -print0 | sort -z` → `readdirSync` filter + `localeCompare` by basename. Bash `mktemp` + atomic `mv` rename → `readFileSync` compare + conditional `writeFileSync` (no rewrite when content identical, mirroring bash's "only write if different"). Bash `diff -q` + `diff` invocation in `--check` mode → in-memory line-by-line comparison emitting `<` / `>` diff markers. Phase-1a 50-line safety guard preserved (refuses to overwrite shorter files unless `BACKLOG_WRITE_FORCE=1`). Three modes preserved: write (default) / `--check` / `--stdout`. | ||||||
|
||||||
| - **`generate-index.ts`** (217 → 282 lines): bash awk frontmatter parser (state machine + `gsub` for quote-stripping) → `extractField` + `stripQuotes` helpers; one `RegExp.exec` per known field; bash `find -name 'B-*.md' -type f -print0 | sort -z` → `readdirSync` filter + `localeCompare` by basename. Bash `mktemp` + atomic `mv` rename → `readFileSync` compare + conditional `writeFileSync` (no rewrite when content identical, mirroring bash's "only write if different"). Bash `diff -q` + `diff` invocation in `--check` mode → in-memory line-by-line comparison emitting `<` / `>` diff markers. Phase-1a 50-line safety guard preserved (refuses to overwrite shorter files unless `BACKLOG_WRITE_FORCE=1`). Three modes preserved: write (default) / `--check` / `--stdout`. | |
| - **`generate-index.ts`** (217 → 282 lines): bash awk frontmatter parser (state machine + `gsub` for quote-stripping) → `extractField` + `stripQuotes` helpers using `startsWith` checks for the known fields; bash `find -name 'B-*.md' -type f -print0 | sort -z` → `readdirSync` filter + `localeCompare` by basename. Bash `mktemp` + atomic `mv` rename → direct `writeFileSync` after the TypeScript-side safety checks. Bash `diff -q` + `diff` invocation in `--check` mode → in-memory line-by-line comparison emitting `<` / `>` diff markers. Phase-1a 50-line safety guard preserved (refuses to overwrite when the existing file is longer than 50 lines unless `BACKLOG_WRITE_FORCE=1`). Three modes preserved: write (default) / `--check` / `--stdout`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1 (xref): In the RESUME PR table, the
#878row is missing the merged commit hash, butslice-audits.mdrecords Slice 7 as merged with commit4dac957. This table appears to include commits for merged slices; please add the commit for #878 (or reconcile if the recorded commit is wrong).