feat(hygiene): migrate shard schema checker to Bun/TypeScript#1986
Closed
AceHack wants to merge 3 commits into
Closed
feat(hygiene): migrate shard schema checker to Bun/TypeScript#1986AceHack wants to merge 3 commits into
AceHack wants to merge 3 commits into
Conversation
Co-Authored-By: Codex <noreply@openai.com>
Comment on lines
21
to
27
Comment on lines
65
to
70
Comment on lines
95
to
110
Comment on lines
646
to
650
Member
Author
|
Superseded by #1976 after syncing this branch with current main. The TypeScript shard-schema checker content is already on main; this PR's remaining diff is only the executable-bit change on tools/hygiene/check-tick-history-shard-schema.ts, which is not needed for the documented |
auto-merge was automatically disabled
May 8, 2026 01:38
Pull request was closed
AceHack
added a commit
that referenced
this pull request
May 17, 2026
… (9 tests)
Addresses B-0156 acceptance criterion 2 ("each TS sibling has at least
one bun test covering its primary entry path") for the Phase 2 schema
port at tools/hygiene/check-tick-history-shard-schema.ts. The .sh
original was deleted in PR #1986; the .ts had no co-located test.
What
- Export scanOne and ScanResult from check-tick-history-shard-schema.ts
(minimal surface change — no behavior change).
- Add check-tick-history-shard-schema.test.ts with 9 cases:
- 3 acceptance paths (HHMMZ.md, HHMMZ-<hex>.md, HH:MM:SSZ col1)
- 6 violation paths (bad filename, col1 date/time mismatches,
insufficient pipes, empty file, col1 format error)
- Dynamic-import pattern so REPO_ROOT is set to a tmpdir before module
load, captures and restores the prior REPO_ROOT to keep env clean
across the broader bun test run.
Why
Per the B-0156 row, criterion 2 was unverified for the 3 hygiene .ts
ports (snapshot-github-settings, check-github-settings-drift,
check-tick-history-shard-schema). The check-tick-history schema port
is the smallest of the three (~5KB) and has the most testable surface
(per-shard validator with structured return). This is the bounded
B-0156 slice for this tick.
Checks
- bun test tools/hygiene/check-tick-history-shard-schema.test.ts: 9/9 pass
- bun test tools/hygiene/: 181/181 pass (no regression)
- bun tools/hygiene/check-tick-history-shard-schema.ts: production
CLI runs (existing pre-PR violations unchanged)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
7 tasks
AceHack
added a commit
that referenced
this pull request
May 17, 2026
… (9 tests) (#4047) Addresses B-0156 acceptance criterion 2 ("each TS sibling has at least one bun test covering its primary entry path") for the Phase 2 schema port at tools/hygiene/check-tick-history-shard-schema.ts. The .sh original was deleted in PR #1986; the .ts had no co-located test. What - Export scanOne and ScanResult from check-tick-history-shard-schema.ts (minimal surface change — no behavior change). - Add check-tick-history-shard-schema.test.ts with 9 cases: - 3 acceptance paths (HHMMZ.md, HHMMZ-<hex>.md, HH:MM:SSZ col1) - 6 violation paths (bad filename, col1 date/time mismatches, insufficient pipes, empty file, col1 format error) - Dynamic-import pattern so REPO_ROOT is set to a tmpdir before module load, captures and restores the prior REPO_ROOT to keep env clean across the broader bun test run. Why Per the B-0156 row, criterion 2 was unverified for the 3 hygiene .ts ports (snapshot-github-settings, check-github-settings-drift, check-tick-history-shard-schema). The check-tick-history schema port is the smallest of the three (~5KB) and has the most testable surface (per-shard validator with structured return). This is the bounded B-0156 slice for this tick. Checks - bun test tools/hygiene/check-tick-history-shard-schema.test.ts: 9/9 pass - bun test tools/hygiene/: 181/181 pass (no regression) - bun tools/hygiene/check-tick-history-shard-schema.ts: production CLI runs (existing pre-PR violations unchanged) Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
4 tasks
AceHack
added a commit
that referenced
this pull request
May 17, 2026
… met (#4073) The TypeScript-standardization row was in substrate-drift state: row remained `status: open` while every named artifact had landed and every acceptance bullet had a corresponding merged PR. Per `.claude/rules/backlog-item-start-gate.md` step 0 (substrate-drift discriminator added 2026-05-16), the substrate-honest move on an implementation tick is to close the row, not author more work. Evidence (every acceptance bullet → merged PR): 1. Six non-install `.sh` files ported then deleted via Phases 1-4 (snapshot/check-drift/check-schema in #1986; profile in #1962; amara/ani via subsequent ports). Self-test `find tools -name '*.sh' …` now returns only install-graph files under `tools/setup/`. 2. Each TS sibling has a `bun test`: `tools/profile.test.ts` plus `tools/peer-call/smoke.test.ts` (all 8 peer-call wrappers). 3. Phase 5 sweep complete — `.sh` originals deleted (recoverable via `git log --diff-filter=D` per LOST-FILES-LOCATIONS.md). 4. Phase 6 `.py` policy lint: `lint-no-python-files` job at `.github/workflows/gate.yml:877` invoking `bun tools/lint/no-python-files.ts`. Allowlist + 9-test suite present. 5. `grep -E '\.(sh|py)' package.json` returns no matches. 6. All migration PRs landed green; no follow-up regression rows. Smallest safe slice: status flip + Resolution section + BACKLOG.md index regen via `BACKLOG_WRITE_FORCE=1 bun tools/backlog/generate-index.ts`. operative-authorization: aaron 2026-05-14: "- **Devil-pole** (edge-runner drive): keep pushing, discover, go hard, never-be-idle" Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary\nDecomposed from PR #1976 and #1977 to ensure atomic commits.\nThis is the pure code migration for B-0140 Phase 2, converting the
check-tick-history-shard-schema.shscript to Bun/TypeScript.\n\n## Integrity\n- No documentation or shadow log changes are bundled here.\n- Script executes via Bun.