Skip to content

ci(gate): switch 3 lint jobs from .sh to .ts via bun (final risk-strat tier)#1380

Merged
AceHack merged 1 commit intomainfrom
ci/gate-yml-three-lint-jobs-bun-ts
May 3, 2026
Merged

ci(gate): switch 3 lint jobs from .sh to .ts via bun (final risk-strat tier)#1380
AceHack merged 1 commit intomainfrom
ci/gate-yml-three-lint-jobs-bun-ts

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 3, 2026

Summary

Conversion pattern

Same as #1377 / #1378 — add ./tools/setup/install.sh step to provide bun via mise pin, then call bun tools/hygiene/<name>.ts instead of tools/hygiene/<name>.sh.

The three lint jobs run in parallel, so the bun install cost is bounded by the slowest job's path (not 3x).

After this lands

The 5 deferred .sh files can be removed in a follow-up cleanup PR:

  • tools/hygiene/audit-memory-index-duplicates.sh
  • tools/hygiene/audit-memory-references.sh
  • tools/hygiene/check-archive-header-section33.sh
  • tools/hygiene/check-no-conflict-markers.sh
  • tools/hygiene/check-tick-history-order.sh

Closes the maintainer ask from #1371: "we should clean up .sh and any .sh where we have the .ts I thought we were fully converted."

Test plan

  • CI runs all 3 converted lint jobs successfully (lint-tick-history-order, lint-no-conflict-markers, lint-archive-header-section33)
  • Each job's output matches the .sh equivalent (parity already verified locally)
  • No regression in other gate.yml jobs

🤖 Generated with Claude Code

…t tier per #1376)

The gate.yml workflow ran three lint scripts as .sh:
  - tools/hygiene/check-tick-history-order.sh
  - tools/hygiene/check-no-conflict-markers.sh
  - tools/hygiene/check-archive-header-section33.sh

All three have a TS+Bun port in tools/hygiene/<name>.ts with full
output / exit-code parity verified locally (179 tick-history rows
non-decreasing; 0 conflict-marker violations; 0 §33 archive-header
violations).

Why this PR closes the .sh→.ts cleanup loop:
  - #1377 converted memory-index-duplicate-lint.yml (lowest-risk —
    only fires on memory/MEMORY.md changes)
  - #1378 converted memory-reference-existence-lint.yml (lowest-risk
    — only fires on memory/** changes)
  - This PR converts gate.yml's three lint jobs (highest-risk — fires
    on every PR via the all-PR gate critical path)
  - #1379 (rerere ALLOWLIST parity) was a prerequisite — the .ts port
    of check-no-conflict-markers had to ALLOWLIST the rerere memo to
    match the .sh version BEFORE running on every PR

After this lands and CI verifies green, the 5 deferred .sh files can
be removed (audit-memory-index-duplicates.sh, audit-memory-references
.sh, check-archive-header-section33.sh, check-no-conflict-markers.sh,
check-tick-history-order.sh) — completing the .sh cleanup the
maintainer asked for in #1371 ("we should clean up .sh and any .sh
where we have the .ts I thought we were fully converted").

Conversion pattern (identical for all three jobs):
  - Add "Install toolchain via three-way-parity script" step calling
    ./tools/setup/install.sh — same shape as #1377 + #1378
  - Change `run: tools/hygiene/<name>.sh` to
    `run: bun tools/hygiene/<name>.ts`

Three lint jobs run in parallel (one job each), so the bun install
cost is bounded by the slowest job's path — does not compound.
Copilot AI review requested due to automatic review settings May 3, 2026 11:10
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@AceHack AceHack enabled auto-merge (squash) May 3, 2026 11:10
@AceHack AceHack merged commit 66613d4 into main May 3, 2026
27 checks passed
@AceHack AceHack deleted the ci/gate-yml-three-lint-jobs-bun-ts branch May 3, 2026 11:13
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repo’s highest-risk CI workflow (gate.yml) to complete the ongoing hygiene-tool migration from Bash scripts to TypeScript scripts executed via Bun, aligning gate lint jobs with the “install toolchain via install.sh + bun tools/hygiene/*.ts” pattern used elsewhere.

Changes:

  • Adds ./tools/setup/install.sh steps to three gate lint jobs to ensure Bun is available via the repo’s pinned toolchain.
  • Switches three lint invocations from tools/hygiene/*.sh to bun tools/hygiene/*.ts (tick-history order, conflict markers, §33 archive header).

Comment on lines +648 to +657
- name: Install toolchain via three-way-parity script (GOVERNANCE §24)
# Provides bun via mise's pin in .mise.toml. Same pattern as
# memory-index-duplicate-lint.yml (#1377) +
# memory-reference-existence-lint.yml (#1378). shellenv.sh
# wires BASH_ENV so subsequent run: steps auto-source the
# managed shellenv with bun on PATH.
run: ./tools/setup/install.sh

- name: Run check-tick-history-order
run: tools/hygiene/check-tick-history-order.sh
run: bun tools/hygiene/check-tick-history-order.ts
Comment on lines +649 to +653
# Provides bun via mise's pin in .mise.toml. Same pattern as
# memory-index-duplicate-lint.yml (#1377) +
# memory-reference-existence-lint.yml (#1378). shellenv.sh
# wires BASH_ENV so subsequent run: steps auto-source the
# managed shellenv with bun on PATH.
Comment on lines +680 to +689
- name: Install toolchain via three-way-parity script (GOVERNANCE §24)
# Provides bun via mise's pin in .mise.toml. Same pattern as
# memory-index-duplicate-lint.yml (#1377) +
# memory-reference-existence-lint.yml (#1378). shellenv.sh
# wires BASH_ENV so subsequent run: steps auto-source the
# managed shellenv with bun on PATH.
run: ./tools/setup/install.sh

- name: Run check-no-conflict-markers
run: tools/hygiene/check-no-conflict-markers.sh
run: bun tools/hygiene/check-no-conflict-markers.ts
Comment on lines +716 to +725
- name: Install toolchain via three-way-parity script (GOVERNANCE §24)
# Provides bun via mise's pin in .mise.toml. Same pattern as
# memory-index-duplicate-lint.yml (#1377) +
# memory-reference-existence-lint.yml (#1378). shellenv.sh
# wires BASH_ENV so subsequent run: steps auto-source the
# managed shellenv with bun on PATH.
run: ./tools/setup/install.sh

- name: Run check-archive-header-section33
run: tools/hygiene/check-archive-header-section33.sh
run: bun tools/hygiene/check-archive-header-section33.ts
AceHack added a commit that referenced this pull request May 3, 2026
…rsion (#1380) + #1378 reviewer fix (#1381)

Final risk-strat tier of the .sh→.ts CI cleanup. PR #1380 opens with
all 3 gate.yml lint jobs (check-tick-history-order,
check-no-conflict-markers, check-archive-header-section33) converted
in one bounded PR — rationale: independent parallel jobs, parity
verified locally, mitigates 3-PR round-trip cost.

PR #1378 reviewer thread (FACTORY-HYGIENE.md row 59) addressed in
commit 3e0342c on that branch. Thread resolved via GraphQL.

Discipline lesson: pre-flight surface scan as parity-debt prevention.
AceHack added a commit that referenced this pull request May 3, 2026
…conversion completed (#1382)

The maintainer asked in #1371: *"we should clean up .sh and any .sh
where we have the .ts I thought we were fully converted."* Initially
13 zero-ref .sh files were removed; 5 were deferred because they were
still referenced from CI workflows. Those 3 workflows are now all
converted (#1377 + #1378 + #1380), and #1379 fixed the prerequisite
allowlist parity bug in check-no-conflict-markers.ts.

Removed:
  - tools/hygiene/audit-memory-index-duplicates.sh (→ memory-index-duplicate-lint.yml via #1377)
  - tools/hygiene/audit-memory-references.sh (→ memory-reference-existence-lint.yml via #1378)
  - tools/hygiene/check-archive-header-section33.sh (→ gate.yml via #1380)
  - tools/hygiene/check-no-conflict-markers.sh (→ gate.yml via #1380)
  - tools/hygiene/check-tick-history-order.sh (→ gate.yml via #1380)

All 5 .ts ports run clean locally post-deletion (exit 0; same output
as the .sh equivalents — verified manually before this commit).

Surface-update set (active substrate that pointed at the .sh as a
current tool):
  - tools/hygiene/LOST-FILES-LOCATIONS.md — survey command + composes-with
    pointers updated from .sh to .ts (the only runtime-bound reference)
  - docs/trajectories/typescript-bun-migration/RESUME.md — Bucket D
    listing updated; 5 entries removed; new "Removed 2026-05-03" note
    added explaining why
  - tools/hygiene/audit-orphan-role-refs.sh — comment composes-with
    template updated to .ts
  - tools/hygiene/check-role-ref-on-current-state-surfaces.sh — comment
    composes-with sibling-pattern updated to .ts
  - tools/hygiene/sort-tick-history-canonical.ts — comment composes-with
    detection-check updated to .ts
  - tools/hygiene/check-tick-history-shard-schema.sh — comment
    composes-with legacy-monolithic-check updated to .ts
  - tools/lint/doc-comment-history-audit.baseline — 2 entries for the
    deleted audit-memory-references.sh removed (else baseline would
    diff against the next audit run that no longer matches a deleted
    path)

Historical surfaces deliberately NOT updated (pure history record):
  - docs/hygiene-history/** (tick shards + loop-tick-history.md)
  - docs/pr-preservation/** (preservation logs)
  - docs/research/** (research reports)
  - memory/** (history-surface attribution carve-out)
  - docs/backlog/** rows (describe past tickets that referenced .sh)
  - docs/0-0-0-readiness/CLASSIFICATION.md (sync-classification audit
    of past LFG↔AceHack divergence)

Closes the .sh→.ts cleanup loop opened in #1371. Composes with #1373
+ #1374 (stale-ref sweeps that caught earlier comprehensive-ref-check
misses).
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.

2 participants