Skip to content

hygiene: validate bash retirement allowlist integrity#5358

Merged
AceHack merged 4 commits into
mainfrom
claim/codex-loop-bash-retirement-allowlist-integrity-20260526
May 26, 2026
Merged

hygiene: validate bash retirement allowlist integrity#5358
AceHack merged 4 commits into
mainfrom
claim/codex-loop-bash-retirement-allowlist-integrity-20260526

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 26, 2026

Summary

  • validate the retained shell allowlist for duplicate and out-of-order entries before classifying repo .sh drift
  • surface allowlist integrity counts in the bash-retirement inventory report
  • cover duplicate, unsorted, and rendered integrity-error cases in the focused Bun test

Checks

  • bun test tools/hygiene/check-bash-retirement-inventory.test.ts
  • bun run hygiene:check-bash-retirement-inventory
  • node_modules/.bin/tsc --noEmit -p tsconfig.json

Lior and others added 4 commits May 26, 2026 19:37
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Copilot AI review requested due to automatic review settings May 26, 2026 23:50
@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 26, 2026 23:52
@AceHack AceHack merged commit a2f3689 into main May 26, 2026
33 checks passed
@AceHack AceHack deleted the claim/codex-loop-bash-retirement-allowlist-integrity-20260526 branch May 26, 2026 23:52
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 hardens the bash-retirement inventory guard (tools/hygiene/check-bash-retirement-inventory.ts) by validating that the retained-shell allowlist itself is sorted and de-duplicated before using it to classify repo .sh drift, and it surfaces integrity counts in the report output.

Changes:

  • Add allowlist integrity inspection (duplicate detection + out-of-order detection) and treat integrity drift as a first-class “drift” condition.
  • Extend the rendered report with allowlist integrity counts and a dedicated integrity-errors section that suppresses normal drift classification until fixed.
  • Add focused Bun tests covering duplicate/unsorted allowlist detection and integrity-error rendering (partial).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tools/hygiene/check-bash-retirement-inventory.ts Adds allowlist integrity validation and report rendering for integrity errors/counts.
tools/hygiene/check-bash-retirement-inventory.test.ts Adds tests for allowlist integrity drift and one integrity rendering path.
docs/claims/codex-loop-bash-retirement-allowlist-integrity-20260526.md Adds a live claim artifact (should be released/removed before merge per protocol).

Comment on lines +3 to +24
claimed-at: 2026-05-26T23:34:00Z
agent: Codex
session: codex/launchd-loop
surface: codex-background-service
origin: codex-launchd-loop
run-id: 20260526T232949Z
branch: claim/codex-loop-bash-retirement-allowlist-integrity-20260526
worktree: /Users/acehack/.local/share/zeta-codex-loop/Zeta-worktrees/codex-loop-bash-retirement-allowlist-integrity-20260526

## Scope

Trajectory: TypeScript / Bun migration.

Bounded step: harden the bash-retirement inventory guard so the retained shell
allowlist is itself checked for duplicate or unsorted entries before it is used
to classify repo `.sh` drift.

## Paths

- tools/hygiene/check-bash-retirement-inventory.ts
- tools/hygiene/check-bash-retirement-inventory.test.ts
- docs/claims/codex-loop-bash-retirement-allowlist-integrity-20260526.md
Comment on lines +114 to +118
test("renders allowlist integrity errors before drift sections", () => {
const [duplicate, rest] = splitExpectedRetained();
const rendered = renderReport(buildInventoryReport(EXPECTED_RETAINED_SHELL, [duplicate, duplicate, ...rest]));

expect(rendered).toContain("## Retained shell allowlist integrity errors");
AceHack added a commit that referenced this pull request May 27, 2026
Release stale Codex claim files for merged PRs #5358 and #5360, and delete the temporary release claim file in the same PR.

Co-Authored-By: Codex <noreply@openai.com>
Codex-Origin: codex-launchd-loop
Codex-Surface: codex-background-service
Codex-Loop-Run-Id: 20260527T020310Z
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