Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .ai/memory/MEMORY.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Memory index

No durable project memories yet. Add dated notes as Markdown files in this directory and link them
from this index.
- [CI audit, 2026-09-26](ci-audit-2026-09-26.md): runner cost, workflow scope,
local checks, and the hosted verification still required.

Memories are observations from a moment in time. Verify claims that may have drifted against current
code.
96 changes: 96 additions & 0 deletions .ai/memory/ci-audit-2026-09-26.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# CI audit, 2026-09-26

Scope: Claudex at `a8d4d21` with local, uncommitted CI edits. This is dated
evidence, not proof that the edits passed hosted CI.

## Evidence and decisions

- Audited all six GitHub Actions workflows, the required branch statuses,
native platform coverage, release checks, and local test entry points.
- The repository was public when checked. [GitHub billing guidance](https://docs.github.com/en/actions/concepts/billing-and-usage)
says standard hosted runners are free for public repositories. The standard
GitHub runner choice and Blacksmith exception are recorded in
`docs/development.md`.
- The [2026-09-23 Blacksmith run](https://github.com/BeamoTech/Claudex/actions/runs/35803572683)
waited nearly three hours for macOS. The
[2026-09-26 GitHub run](https://github.com/BeamoTech/Claudex/actions/runs/36283161738)
started macOS within seconds and completed the matrix in about 16 minutes.
Those are dated observations, not a guarantee of future queue times.
- On that GitHub run, the macOS Bash suite took 15 minutes 29 seconds; checkout
took two seconds and the following PowerShell test took 30 seconds. The Bash
suite is the wall time bottleneck.
- The [2026-07-22 release run](https://github.com/BeamoTech/Claudex/actions/runs/29904821169)
spent about 15 minutes in its macOS release gate, then 24 seconds in the
publishing job. The matching [installer verification](https://github.com/BeamoTech/Claudex/actions/runs/29905853826)
resolved the expected version in four seconds. These short jobs do not
justify changing release ordering or public installation coverage.
- Among the latest 100 Actions runs checked on 2026-09-26, three older pull
request test matrices were canceled during rapid source updates in August.
The existing main test concurrency is doing useful work; keep it.
- The latest inspected [CodeQL job](https://github.com/BeamoTech/Claudex/actions/runs/36283161748)
took 66 seconds. The inspected [dependency review](https://github.com/BeamoTech/Claudex/actions/runs/35924267214)
took four seconds and [labeler](https://github.com/BeamoTech/Claudex/actions/runs/35924267290)
took eight seconds. Their security and labeling coverage is worth retaining.
- `package-lock.json` lists only the root package and no external npm packages.
There is no dependency installation in the test matrix to accelerate with an
npm cache. The release builder uses repository files and local staging, so
an archive cache would risk stale source and cost more coordination.
- Local edits cancel superseded dependency review and labeler runs, remove a
redundant labeler event, and avoid a second apt index fetch in the legacy
Ubuntu test.
- [GitHub reusable workflow guidance](https://docs.github.com/en/actions/reference/workflows-and-actions/reusing-workflow-configurations)
says a called workflow inherits the caller's `github` context. The test
workflow now defaults a reusable call input to preserving an independent
run group, including when the optional `ref` is omitted. Direct branch and
pull request runs still cancel stale checks. The old
`github.event_name == 'workflow_call'` condition could not identify a call.
- Required statuses, native macOS, Ubuntu, and Windows suites, CodeQL,
dependency review, minimum Node coverage, and release gates remain present.
- Branch protection still requires `macos-15`, `ubuntu-24.04`, `windows-2025`,
`ubuntu-20.04-managed-node`, `package-artifacts`, `CodeQL`, and
`Dependency review` with strict up to date checking. The repository was
confirmed public again during this local review.

## Local verification

- The original `test.zsh` passed on macOS in 554 seconds against the edited
source. A trial that skipped some skill discovery passed twice in 565 and
626 seconds, so it was removed: these runs did not show a speed benefit.
- A temporary profile of the passing suite measured about 153 seconds in proxy
and model checks, 111 seconds in composite launch checks, and 166 seconds in
update lock and detached update checks. These retain race and provider
boundary coverage.
- A later timing profile exposed a test race: the background status refresh
helper had only two seconds to publish its log before the Unix test read it.
The Unix and Windows suites now wait up to 20 seconds for four complete
lines, exiting early on the normal path. A deliberately delayed Unix helper
and the PowerShell fixture write passed locally. The exact edited `test.zsh`
suite passed in 676 seconds after the final fixture edits; native Windows
verification is still pending.
- Every preceding component of `test.sh` passed separately, including watcher,
authentication lock, Windows source parity, and test driver regressions.
- `npm test`, macOS PowerShell self update lock regressions, `actionlint`, Bash
syntax checks, Markdown checks, `git diff --check`, and release archive
reproducibility and extracted install checks passed.
- The agent, development, and contributor syntax commands now use
`bash -n test.zsh`, matching the script shebang and the shell that CI runs.
- The first authorized PR matrix on 2026-09-26 passed macOS, Ubuntu, Node 18,
archives, CodeQL, and dependency review. The Windows main suite also passed,
but its separate self update lock regression failed after an X/Y/Z race:
the next successful probe used a 12-attempt test limit, shorter than the
updater's two second stale lock grace. The test now requires Y to exit
successfully, gives that probe the normal 100-attempt budget, allows bounded
child completion on loaded hosts, and terminates remaining children before
fixture cleanup. Its focused macOS PowerShell run passed; the revised Windows
run still needs native verification.
- The first hosted Ubuntu 20.04 container job passed. The revised Windows test
and all required statuses on the final source still need hosted verification.
Before the user authorized that run, no hosted CI had been triggered.
- Parallelizing the short, isolated shell regressions in `test.sh` would save
little compared with the macOS launcher suite and would complicate its
early failure test driver. Keep their sequential order until measured evidence
justifies a change.

Next action: verify the exact edited source on all required hosted platforms and
compare job times and required statuses with the dated baseline. Recheck
visibility and runner access before any provider change.
5 changes: 5 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
permissions:
contents: read

# A newer revision of the same PR supersedes an unfinished dependency review.
concurrency:
group: dependency-review-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
review:
name: Dependency review
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@ name: Pull request labeling

on:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review]
types: [opened, synchronize, reopened]

permissions:
contents: read
pull-requests: write

# Labels are synchronized from the latest PR diff, so discard older updates.
concurrency:
group: labeler-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
label:
name: Label changed areas
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ on:
description: Git ref to test (defaults to the triggering ref)
required: false
type: string
preserve_run:
description: Keep each reusable verification gate independent
required: false
default: true
type: boolean

permissions:
contents: read

# A newer commit supersedes an in-flight run for the same ref. Reusable
# workflow calls get a per-run group so callers remain independent.
# A newer commit supersedes an in-flight direct run for the same ref. Reusable
# calls keep independent gates even when the caller omits the optional ref.
concurrency:
group: test-${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'workflow_call' && github.run_id || github.ref }}
cancel-in-progress: ${{ github.event_name != 'workflow_call' }}
group: test-${{ github.workflow }}-${{ github.event_name }}-${{ inputs.preserve_run && github.run_id || github.ref }}
cancel-in-progress: ${{ !inputs.preserve_run }}

jobs:
unix:
Expand Down Expand Up @@ -64,7 +69,7 @@ jobs:
- name: Install checkout prerequisites
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y ca-certificates git
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl git jq
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.ref || github.ref }}
Expand Down
9 changes: 7 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,18 @@ node tests/skill-bridge.test.cjs # discovery/materialization behavior
node tests/skill-contract.test.cjs # Claude/Codex compatibility contract
node tests/skill-security.test.cjs # hostile filesystem/plugin inputs
bash -n claudex codex-session install.sh statusline usage-limit
zsh -n test.zsh
bash -n test.zsh
git diff --check
```

There is no single test runner: `test.zsh`/`test.ps1` are one large suite of isolated regressions using fake homes and fake provider commands (Codex, Claude Code, curl, CLIProxyAPI) so tests never touch a real session. To narrow scope while iterating, grep the suite file for the relevant test function name and read it directly; there's no `--filter` flag.

CI (`.github/workflows/test.yml`) runs on every push to `main` and every PR: the Unix suite on macOS + Ubuntu, the PowerShell suite on Windows, plus three Ubuntu jobs: `package-artifacts` (`npm test` + `scripts/check-release-artifacts.sh`), `node-18-shared-runtime` (`npm test` on the minimum supported Node), and `legacy-linux-node` (managed Node fallback in an Ubuntu 20.04 container).
CI (`.github/workflows/test.yml`) runs on every push to `main` and every PR:
the Unix suite on macOS + Ubuntu, the PowerShell suite on Windows, plus three
Ubuntu jobs: `package-artifacts` (package metadata and reproducible archive
checks), `node-18-shared-runtime` (`npm test` on the minimum supported Node),
and `legacy-linux-node` (managed Node fallback in an Ubuntu 20.04 container).
Current runner selection and its cost exception are in `docs/development.md`.

## Architecture

Expand Down
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ uses [Semantic Versioning](https://semver.org/) for tagged releases.

## [Unreleased]

## [1.6.3] - 2026-09-26

### Changed

- Reduced redundant pull request verification and repeated legacy Linux setup
while retaining native platform, security, and release checks.

### Fixed

- Stabilized asynchronous status refresh and Windows self update lock test
fixtures on slower CI hosts.

## [1.6.2] - 2026-07-22

### Added
Expand Down Expand Up @@ -490,7 +502,8 @@ uses [Semantic Versioning](https://semver.org/) for tagged releases.
- Claude in Chrome first party profile support.
- Cross platform regression coverage in GitHub Actions.

[Unreleased]: https://github.com/BeamoINT/Claudex/compare/v1.6.2...HEAD
[Unreleased]: https://github.com/BeamoINT/Claudex/compare/v1.6.3...HEAD
[1.6.3]: https://github.com/BeamoINT/Claudex/compare/v1.6.2...v1.6.3
[1.6.2]: https://github.com/BeamoINT/Claudex/compare/v1.6.1...v1.6.2
[1.6.1]: https://github.com/BeamoINT/Claudex/compare/v1.6.0...v1.6.1
[1.6.0]: https://github.com/BeamoINT/Claudex/compare/v1.5.8...v1.6.0
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ platform:
```bash
node --check preload.cjs
bash -n claudex codex-session install.sh statusline usage-limit
zsh -n test.zsh
bash -n test.zsh
```

GitHub Actions runs the complete isolated suite on macOS, Ubuntu, and Windows.
Expand Down
11 changes: 9 additions & 2 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,16 @@ Node.js 18 runtime. The hosted matrix does not currently include ARM64 or WSL;
the root README distinguishes those supported paths from configurations tested
on hosted runners.

Claudex is public, so [standard GitHub runners incur no Actions minute charges](https://docs.github.com/en/actions/concepts/billing-and-usage).
The current jobs use those runners. This is the cost exception to the workspace
preference for Blacksmith: the [last Blacksmith matrix](https://github.com/BeamoTech/Claudex/actions/runs/35803572683)
waited nearly three hours for its macOS job, while the [current GitHub matrix](https://github.com/BeamoTech/Claudex/actions/runs/36283161738)
started that job within seconds. Recheck repository visibility, runner access,
queue time, and exact source coverage before changing providers.

CodeQL scans the JavaScript compatibility surface on every pull request and on
a weekly schedule. Dependency Review blocks newly introduced high or critical
dependency vulnerabilities, Dependabot proposes pinned dependency updates, and
dependency vulnerabilities, and
the pull request labeler identifies affected components and platforms. All
third party GitHub Actions are pinned to immutable commits.

Expand All @@ -61,7 +68,7 @@ Useful focused checks:
node scripts/check-docs.mjs
node --check preload.cjs
bash -n claudex codex-session install.sh statusline usage-limit
zsh -n test.zsh
bash -n test.zsh
git diff --check
```

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "claudex-codex",
"version": "1.6.2",
"version": "1.6.3",
"private": true,
"description": "Cross platform compatibility layer for using Codex GPT and native Claude models through Claude Code",
"type": "module",
Expand Down
14 changes: 11 additions & 3 deletions test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2977,12 +2977,14 @@ process.stdout.write(JSON.stringify({
[IO.Directory]::CreateDirectory($statusRefreshConfig) | Out-Null
[IO.File]::WriteAllText($statusRefreshHelper, @'
param([switch] $RefreshCache, [switch] $LockHeld, [string] $LockToken)
[IO.File]::WriteAllLines($env:STATUS_REFRESH_PRIVATE_ENV_LOG, @(
$pendingLog = "$env:STATUS_REFRESH_PRIVATE_ENV_LOG.$PID.pending"
[IO.File]::WriteAllLines($pendingLog, @(
"MANTLE=$env:ANTHROPIC_BEDROCK_MANTLE_BASE_URL",
"VERTEX_PROJECT=$env:ANTHROPIC_VERTEX_PROJECT_ID",
"FOUNDRY_RESOURCE=$env:ANTHROPIC_FOUNDRY_RESOURCE",
"FOUNDRY_API_KEY=$env:ANTHROPIC_FOUNDRY_API_KEY"
))
[IO.File]::Move($pendingLog, $env:STATUS_REFRESH_PRIVATE_ENV_LOG)
'@, $utf8)
$statusRefreshEnvironment = @{}
foreach ($statusRefreshName in @(
Expand All @@ -3001,10 +3003,16 @@ param([switch] $RefreshCache, [switch] $LockHeld, [string] $LockToken)
$env:ANTHROPIC_FOUNDRY_RESOURCE = 'private-foundry-resource'
$env:ANTHROPIC_FOUNDRY_API_KEY = 'private-foundry-secret'
'{"session_id":"private-refresh","model":{"id":"gpt-5.6-sol"},"context_window":{"used_percentage":5}}' | & (Join-Path $root 'statusline.ps1') | Out-Null
for ($attempt = 0; $attempt -lt 100 -and -not (Test-Path -LiteralPath $statusRefreshLog -PathType Leaf); $attempt++) {
$statusRefreshLines = @()
$statusRefreshDeadline = [DateTime]::UtcNow.AddSeconds(20)
while ($statusRefreshLines.Count -lt 4 -and [DateTime]::UtcNow -lt $statusRefreshDeadline) {
if (Test-Path -LiteralPath $statusRefreshLog -PathType Leaf) {
try { $statusRefreshLines = @([IO.File]::ReadAllLines($statusRefreshLog)) } catch [IO.IOException] { }
}
if ($statusRefreshLines.Count -ge 4) { break }
Start-Sleep -Milliseconds 20
}
$statusRefreshLines = @([IO.File]::ReadAllLines($statusRefreshLog))
Assert-True ($statusRefreshLines.Count -eq 4) 'status refresh helper writes a complete environment log'
Assert-True (($statusRefreshLines -join '|') -eq 'MANTLE=|VERTEX_PROJECT=|FOUNDRY_RESOURCE=|FOUNDRY_API_KEY=') 'status refresh helper receives no private cloud-provider environment'
} finally {
foreach ($statusRefreshName in $statusRefreshEnvironment.Keys) {
Expand Down
9 changes: 8 additions & 1 deletion test.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -1762,7 +1762,14 @@ printf '%s\n' '{"session_id":"private-refresh","model":{"id":"gpt-5.6-sol"},"con
ANTHROPIC_FOUNDRY_RESOURCE='private-foundry-resource' \
ANTHROPIC_FOUNDRY_API_KEY='private-foundry-secret' \
"$root/statusline" >/dev/null
for _ in {1..100}; do [[ -s "$status_refresh_log" ]] && break; sleep 0.02; done
# Refresh runs in the background. Wait for all four lines before reading the
# helper's evidence so loaded hosts cannot expose a partial write.
for _ in {1..1000}; do
if [[ -s "$status_refresh_log" ]] && [[ $(wc -l < "$status_refresh_log") -ge 4 ]]; then break; fi
sleep 0.02
done
[[ -s "$status_refresh_log" ]] || { printf '%s\n' 'status refresh helper did not write its environment log' >&2; exit 1; }
[[ $(wc -l < "$status_refresh_log") -eq 4 ]] || { printf '%s\n' 'status refresh helper wrote an incomplete environment log' >&2; exit 1; }
[[ "$(<"$status_refresh_log")" == $'MANTLE=\nVERTEX_PROJECT=\nFOUNDRY_RESOURCE=\nFOUNDRY_API_KEY=' ]]

printf '%s\n' 'Codex 7d 16% left · Review 7d 9% left · Extra-long-capacity-window 30d 8% left' \
Expand Down
9 changes: 7 additions & 2 deletions tests/legacy-linux-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ readonly temporary="$(mktemp -d)"
trap 'rm -rf "$temporary"' EXIT

[[ "$(id -u)" == 0 ]] || { printf '%s\n' 'legacy Linux runtime test must run as root in a disposable container' >&2; exit 1; }
apt-get update >/dev/null
DEBIAN_FRONTEND=noninteractive apt-get install -y ca-certificates curl jq >/dev/null
# CI installs these before checkout. Standalone container runs still install
# missing tools, but an already prepared runner avoids a second apt index fetch.
if ! command -v curl >/dev/null 2>&1 || ! command -v jq >/dev/null 2>&1 || \
[[ ! -s /etc/ssl/certs/ca-certificates.crt ]]; then
apt-get update >/dev/null
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl jq >/dev/null
fi

home="$temporary/home"
fake_bin="$temporary/bin"
Expand Down
Loading