Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
7a37b6a
fix: harden wrapper exits and matrix regressions
ndycode Mar 3, 2026
8ae183f
fix: add windows fs retry guards for shim writes
ndycode Mar 3, 2026
4e6e7be
fix: harden oauth code exchange timeout handling
ndycode Mar 3, 2026
50f3ea0
feat: implement enterprise hardening baseline
ndycode Mar 3, 2026
a09f3dc
fix: harden secret key derivation and docs
ndycode Mar 3, 2026
42dcaf0
fix: resolve PR #31 timeout boundary feedback
ndycode Mar 3, 2026
44da5f0
fix: address remaining PR #31 review findings
ndycode Mar 3, 2026
f274725
fix: address review follow-ups for auth and lock tests
ndycode Mar 3, 2026
2df5e06
Sanitize OAuth refresh HTTP failure handling
ndycode Mar 3, 2026
70dba01
feat(auth): add ABAC policy guardrails for CLI actions
ndycode Mar 3, 2026
8234ccc
Harden config, network fetches, and shutdown reliability
ndycode Mar 3, 2026
2013dbe
refactor: extract shared account view helpers
ndycode Mar 3, 2026
d1c603e
fix: guard account storage with file lock
ndycode Mar 3, 2026
2287675
fix: resolve remaining PR31 reliability review threads
ndycode Mar 3, 2026
00dba6e
refactor: centralize active-index family mutations
ndycode Mar 3, 2026
0d96ab3
refactor: unify active-index normalization flow
ndycode Mar 3, 2026
a0b9d72
refactor: share family rate-limit status formatting
ndycode Mar 3, 2026
f8bf733
refactor: share family index label formatting
ndycode Mar 3, 2026
0e0edf8
refactor: extract account-removal index reconciliation
ndycode Mar 3, 2026
02d34d1
fix(storage): harden lock cleanup for stale/failed storage locks
ndycode Mar 3, 2026
6b7b2e8
refactor: centralize account storage clone/empty factories
ndycode Mar 3, 2026
77d0e03
test: add boundary regression tests for core flows
ndycode Mar 4, 2026
fd53da6
chore(dx): add unified verify pipeline
ndycode Mar 4, 2026
898d708
test: tighten prompt refresh dedupe regression
ndycode Mar 4, 2026
b120301
chore(dx): add one-command local dev bootstrap
ndycode Mar 4, 2026
e06e5e5
test: use waitFor for prompt dedupe stability assertions
ndycode Mar 4, 2026
5d0da22
chore(dx): unify verify gates and add release/local runbooks
ndycode Mar 4, 2026
ccf3e66
test(dx): cover bootstrap scripts and harden Windows setup retries
ndycode Mar 4, 2026
d267377
fix(storage): serialize account file lock queue
ndycode Mar 4, 2026
1f516d1
fix(storage): remove racy pre-lock cleanup
ndycode Mar 4, 2026
6c33f9c
test(storage): cover lock release fallback behavior
ndycode Mar 4, 2026
19758dc
fix(dx): harden dev doctor checks and align onboarding docs
ndycode Mar 4, 2026
ea8f5a1
feat: add local telemetry ledger and reporting command
ndycode Mar 4, 2026
c576813
fix(dx): address remaining CodeRabbit bootstrap comments
ndycode Mar 4, 2026
d7a8a4d
feat(reliability): add retry governor controls and telemetry
ndycode Mar 4, 2026
8d61b31
test(dx): stub doctor version checks in linux negative-path tests
ndycode Mar 4, 2026
250e82a
feat: harden concurrency and failure handling
ndycode Mar 4, 2026
8d7f0cf
chore(ci): align verify triage docs with workflow gates
ndycode Mar 4, 2026
93d0df5
chore: retrigger CodeRabbit review\n\nCo-authored-by: Codex <noreply@…
ndycode Mar 4, 2026
57fa543
feat: implement enterprise readiness remediation controls
ndycode Mar 4, 2026
a47e597
fix: stabilize conflict-save merge behavior
ndycode Mar 4, 2026
56cf4bb
test: expand config save conflict and contention coverage
ndycode Mar 4, 2026
12218aa
fix: surface quota cache persistence failures in json cli
ndycode Mar 4, 2026
8754da9
fix: harden auth timeout and stream parse behavior
ndycode Mar 4, 2026
214cc09
fix: tighten storage revision tracking and lease timeout fallback
ndycode Mar 4, 2026
9ca464e
test: cover timeout fallbacks for prompt caches
ndycode Mar 4, 2026
a449dc5
fix: finalize coderabbit remediation follow-ups
ndycode Mar 4, 2026
5ad5e4a
feat: add enterprise operations and compliance automation controls
ndycode Mar 4, 2026
a33495a
fix: harden lock ownership and transient read retries
ndycode Mar 4, 2026
2a84707
fix: resolve enterprise PR feedback and harden ops checks
ndycode Mar 4, 2026
fe17253
fix: address PR43 documentation and regression coverage
ndycode Mar 4, 2026
1fadcbc
fix: resolve remaining PR41 concurrency and recovery feedback
ndycode Mar 5, 2026
d0fd29f
fix: remove blocking audit retry sleep in purge path
ndycode Mar 5, 2026
8bb8a71
fix: preserve fresh credentials and recover malformed unified settings
ndycode Mar 5, 2026
15ea07b
fix: handle sync ENOENT races in unified settings
ndycode Mar 5, 2026
a1b9be5
fix: harden settings snapshots and lock release path
ndycode Mar 5, 2026
569ea65
fix: sync known revision to disk after recovery fallback
ndycode Mar 5, 2026
9835542
fix: avoid false config save failures on lock release errors
ndycode Mar 5, 2026
fe98882
fix: resolve PR41 follow-up review threads
ndycode Mar 5, 2026
83dedbb
fix: resolve PR41 stale-lock and exit-code follow-ups
ndycode Mar 5, 2026
ef0702d
fix: resolve PR #32 hardening review follow-ups
ndycode Mar 5, 2026
fdfdb2c
fix: resolve PR43 review feedback and add regression coverage
ndycode Mar 5, 2026
0c48823
fix: resolve remaining PR32 review feedback
ndycode Mar 5, 2026
ceb2c60
fix: resolve remaining PR32 review feedback
ndycode Mar 5, 2026
35d658c
fix(reliability): enforce absolute ceiling on jittered retry waits
ndycode Mar 5, 2026
83a683e
chore(ci): retrigger CodeRabbit after transient rate-limit
ndycode Mar 5, 2026
02f74c8
fix(ops): close PR43 enterprise readiness review gaps
ndycode Mar 5, 2026
82e5046
fix(pr32): resolve remaining review findings
ndycode Mar 5, 2026
c932456
fix(retry): align governor wait planning and config/docs bounds
ndycode Mar 5, 2026
b942f6a
fix(retry): restore deterministic governor thresholds
ndycode Mar 5, 2026
ae2cf9f
test(retry): add concurrent request isolation regression
ndycode Mar 5, 2026
052f935
test(retry): cover retry-limit and overlapping request paths
ndycode Mar 5, 2026
1749d31
fix(pr34): resolve remaining review findings
ndycode Mar 5, 2026
e59c731
fix(pr43): resolve remaining thread blockers
ndycode Mar 5, 2026
11300d9
fix(pr40): harden retry ceiling coverage and logic
ndycode Mar 5, 2026
65112ff
fix: resolve remaining PR34 review feedback
ndycode Mar 5, 2026
2b0afa4
fix: resolve remaining PR43 review threads
ndycode Mar 5, 2026
0deb16f
fix: enforce automatic quota-based account rotation
ndycode Mar 5, 2026
f9838a3
fix: harden quota bootstrap rotation behavior
ndycode Mar 5, 2026
a17553b
fix: align quota bootstrap to model-specific cache entries
ndycode Mar 5, 2026
5088063
fix: remove unreachable quota bootstrap catch
ndycode Mar 5, 2026
f864077
fix(retry): stop exhausted-ceiling zero-wait retries
ndycode Mar 5, 2026
ce0d061
fix: harden quota bootstrap reload and model-id matching
ndycode Mar 5, 2026
193e612
fix: unify preemptive quota scheduler key normalization
ndycode Mar 5, 2026
2e02fca
fix: enforce quota bootstrap cooldown and cache empty loads
ndycode Mar 5, 2026
2d204ca
fix: align quota bootstrap key for model-less requests
ndycode Mar 5, 2026
267aa50
fix: resolve PR43 recovery drill review feedback
ndycode Mar 5, 2026
769a1b1
Merge PR #36: dx/pr1-verify-pipeline into integration/all-approved-pr…
ndycode Mar 6, 2026
3c1542c
Merge PR #37: dx/pr2-dev-bootstrap into integration/all-approved-prs-…
ndycode Mar 6, 2026
5660160
Merge PR #35: qa/test-dominant-origin-main into integration/all-appro…
ndycode Mar 6, 2026
31d6661
Merge PR #32: feat/enterprise-hardening into integration/all-approved…
ndycode Mar 6, 2026
3648a72
Merge PR #34: fix/pr32-feedback into integration/all-approved-prs-to-dev
ndycode Mar 6, 2026
cc18416
resolve conflicts merging PR #43
ndycode Mar 6, 2026
108abd7
resolve conflicts merging PR #41
ndycode Mar 6, 2026
58a5fbf
resolve conflicts merging PR #31
ndycode Mar 6, 2026
a091f81
resolve conflicts merging PR #40
ndycode Mar 6, 2026
bbf23bf
Merge branch 'refactor/arch-pr1-shared-account-helpers' into integrat…
ndycode Mar 6, 2026
21a4c6f
resolve conflicts merging PR #39
ndycode Mar 6, 2026
e458ef7
resolve conflicts merging PR #45
ndycode Mar 6, 2026
37b21bd
resolve conflicts merging PR #30
ndycode Mar 6, 2026
afda35a
fix post-merge validation regressions
ndycode Mar 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

## Validation

- [ ] `npm run lint`
- [ ] `npm run typecheck`
- [ ] `npm test`
- [ ] `npm run verify`
- [ ] `npm test -- test/documentation.test.ts`
- [ ] `npm run build`
- [ ] if triaging failures, validated component gates: `npm run lint`, `npm run verify:repo`, `npm run verify:quality`, `npm run typecheck`, `npm test`, `npm run build`
- [ ] `npm run doctor:dev` (when troubleshooting setup/environment issues)
- [ ] `npm run setup:dev` (for first-clone reproducibility checks)

## Docs and Governance Checklist

Expand Down
23 changes: 23 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
branches:
- name: main
protection:
required_pull_request_reviews:
required_approving_review_count: 1
require_code_owner_reviews: false
dismiss_stale_reviews: true
required_status_checks:
strict: true
checks:
- context: "CI / Test on Node.js 20.x"
- context: "CI / Test on Node.js 22.x"
- context: "CI / Coverage Gate"
- context: "CI / Lint"
- context: "CI / Codex Compatibility Smoke"
- context: "CI / Cross-Platform Smoke (windows-latest)"
- context: "CI / Cross-Platform Smoke (macos-latest)"
- context: "CodeQL / Analyze"
- context: "Secret Scan / Gitleaks"
- context: "Supply Chain / Dependency Review"
- context: "Supply Chain / SCA and License Gate"
enforce_admins: true
restrictions: null
96 changes: 73 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,28 @@ name: CI

on:
push:
branches: [main]
branches: [main, dev]
pull_request:
branches: [main]
branches: [main, dev]

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Test on Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
name: Test on Node.js ${{ matrix.node-version }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
node-version: [20.x, 22.x]
os: [ubuntu-latest]
include:
- node-version: 20.x
os: windows-latest

steps:
- name: Checkout code
Expand All @@ -23,37 +33,42 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache: npm

- name: Install dependencies
run: npm ci

- name: Repository hygiene check
run: npm run clean:repo:check

- name: Security audit (CI policy)
run: npm run audit:ci

- name: Lockfile floor guard
run: npm run test -- test/lockfile-version-floor.test.ts
- name: Run CI verify pipeline
run: npm run verify:ci

- name: Security audit (full dependency tree, non-blocking)
continue-on-error: true
run: npm run audit:all

- name: Run type check
run: npm run typecheck
- name: Generate and verify SBOM
run: |
npm run sbom:generate
npm run sbom:verify

- name: Run tests with coverage
run: npm run coverage
- name: Assert keychain mode storage contract
run: npm run ops:keychain-assert

- name: Build
run: npm run build
- name: Seed enterprise health fixture
run: |
node scripts/seed-health-fixture.js

- name: Enterprise health check
env:
CODEX_MULTI_AUTH_DIR: ${{ github.workspace }}/.tmp/health-fixture
run: npm run ops:health-check -- --require-files

- name: Performance budget check
run: npm run perf:budget-check

lint:
name: Lint

runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- name: Checkout code
Expand All @@ -63,17 +78,21 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
cache: npm

- name: Install dependencies
run: npm ci

- name: Run ESLint
- name: Dev doctor sanity check
run: npm run doctor:dev

- name: Run lint and format checks
run: npm run lint

codex-compat:
name: Codex Compatibility Smoke
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- name: Checkout code
Expand All @@ -83,10 +102,41 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
cache: npm

- name: Install dependencies
run: npm ci

- name: Run Codex compatibility tests
run: npm run test -- test/codex.test.ts test/host-codex-prompt.test.ts test/request-transformer.test.ts test/fetch-helpers.test.ts

cross-platform-smoke:
name: Cross-Platform Smoke (${{ matrix.os }})
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm

- name: Install dependencies
run: npm ci

- name: Run smoke typecheck
run: npm run typecheck

- name: Build
run: npm run build

- name: Run smoke tests
run: npm run test -- test/runtime-paths.test.ts test/codex-bin-wrapper.test.ts test/file-lock.test.ts test/background-jobs.test.ts
69 changes: 69 additions & 0 deletions .github/workflows/recovery-drill.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Recovery Drill

on:
schedule:
- cron: "30 3 1 * *"
workflow_dispatch:

permissions:
contents: read

jobs:
recovery-drill:
name: Monthly Storage Recovery Drill
runs-on: ubuntu-latest
timeout-minutes: 30
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run recovery drill tests
run: |
mkdir -p .tmp
npm run ops:recovery-drill -- --reporter=default --reporter=json --outputFile=.tmp/recovery-drill-vitest.json

- name: Run health check snapshot
run: node scripts/enterprise-health-check.js > .tmp/recovery-drill-health.json 2>&1

- name: Upload recovery drill artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: recovery-drill-artifacts
path: |
.tmp/recovery-drill-vitest.json
.tmp/recovery-drill-health.json

- name: Notify recovery drill failure
if: failure()
env:
RECOVERY_DRILL_WEBHOOK_URL: ${{ secrets.RECOVERY_DRILL_WEBHOOK_URL }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
message="Recovery drill failed. Run: ${RUN_URL}. Artifacts: .tmp/recovery-drill-vitest.json and .tmp/recovery-drill-health.json."
if [[ -n "${RECOVERY_DRILL_WEBHOOK_URL:-}" ]]; then
payload=$(jq -n --arg msg "${message}" '{"text": $msg}')
curl --fail --silent --show-error \
--max-time 30 \
-X POST \
-H "Content-Type: application/json" \
--data "${payload}" \
"${RECOVERY_DRILL_WEBHOOK_URL}"
else
echo "::warning::${message} Configure secrets.RECOVERY_DRILL_WEBHOOK_URL for push notifications."
fi
59 changes: 59 additions & 0 deletions .github/workflows/release-provenance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Release Publish (Provenance)

on:
workflow_dispatch:
release:
types: [published]

permissions:
contents: read
id-token: write

jobs:
publish:
name: Publish with npm provenance
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: https://registry.npmjs.org
cache: npm

- name: Install dependencies
run: npm ci

- name: Validate quality gates
env:
CODEX_MULTI_AUTH_DIR: ${{ github.workspace }}/.tmp/health-fixture
run: |
mkdir -p "${GITHUB_WORKSPACE}/.tmp/health-fixture/logs"
printf '{"version":3,"accounts":[],"activeIndex":0}\n' > "${GITHUB_WORKSPACE}/.tmp/health-fixture/openai-codex-accounts.json"
printf '{"version":1,"pluginConfig":{},"dashboardDisplaySettings":{}}\n' > "${GITHUB_WORKSPACE}/.tmp/health-fixture/settings.json"
printf '{"timestamp":"%s","action":"request.start","outcome":"success"}\n' "$(date -u +%Y-%m-%dT%H:%M:%SZ)" > "${GITHUB_WORKSPACE}/.tmp/health-fixture/logs/audit.log"
npm run audit:ci
npm run ops:health-check -- --require-files
npm run perf:budget-check
npm run lint
npm run typecheck
npm run build
npm test
npm run ops:keychain-assert
npm run sbom:generate
npm run sbom:verify
node scripts/compliance-evidence-bundle.js --profile=quick --out-dir=.tmp/compliance-evidence-release

- name: Upload release evidence bundle
uses: actions/upload-artifact@v4
with:
name: release-evidence-bundle
path: .tmp/compliance-evidence-release

- name: Publish package with provenance
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
48 changes: 48 additions & 0 deletions .github/workflows/retention-maintenance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Retention Maintenance

on:
schedule:
- cron: "15 2 * * 0"
workflow_dispatch:

permissions:
contents: read

jobs:
retention:
name: Weekly Retention Cleanup Drill
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set retention root
run: echo "CODEX_MULTI_AUTH_DIR=${{ runner.temp }}/codex-retention-root" >> "$GITHUB_ENV"

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm

- name: Install dependencies
run: npm ci

- name: Prepare retention fixture
run: |
node -e "const fs=require('fs'); const path=require('path'); const root=process.env.CODEX_MULTI_AUTH_DIR; const logs=path.join(root,'logs','codex-plugin'); const cache=path.join(root,'cache'); const recovery=path.join(root,'recovery'); fs.mkdirSync(logs,{recursive:true}); fs.mkdirSync(cache,{recursive:true}); fs.mkdirSync(recovery,{recursive:true}); const oldFile=path.join(logs,'old-audit.log'); const newFile=path.join(cache,'fresh-cache.json'); fs.writeFileSync(oldFile,'old'); fs.writeFileSync(newFile,'new'); const oldTime=new Date(Date.now()-120*24*60*60*1000); fs.utimesSync(oldFile,oldTime,oldTime);"

- name: Run retention cleanup
run: |
mkdir -p .tmp
node scripts/retention-cleanup.js --days=90 > .tmp/retention-report.json

- name: Verify retention fixture cleanup
run: |
node -e "const fs=require('fs'); const path=require('path'); const root=process.env.CODEX_MULTI_AUTH_DIR; const oldFile=path.join(root,'logs','codex-plugin','old-audit.log'); const newFile=path.join(root,'cache','fresh-cache.json'); if(fs.existsSync(oldFile)){console.error('expected old file to be deleted'); process.exit(1);} if(!fs.existsSync(newFile)){console.error('expected fresh file to remain'); process.exit(1);} console.log('retention verification passed');"

- name: Upload retention report
uses: actions/upload-artifact@v4
with:
name: retention-maintenance-report
path: .tmp/retention-report.json
Loading