Files
headroom/.gitignore
JD DavisandJerrett Davis b235bc2d27 fix(ci): verify installer provenance in build workflows (#4677)
## Current maintainer status (2026-11-10, current-main refresh)

Published head: `db4bdd71e7ddc1a72316445ef0d16a7d90b62951`, containing
upstream main `a385ea8e60a14c1511d82b21d518421af35deab2` through a clean
mechanical merge. All 13 remediation files are byte-identical to
reviewed head `81ff3ed384afbd404c48fd79d6bed41e8d647a99`; no installer,
action metadata, or checksum selection changed.

Fresh focused Windows checks: 61 passed and 23 platform skips. Fresh WSL
offline bootstrap/hook fixtures: 23 passed, with one pytest
configuration warning. These local checks use fixtures and do not claim
live vendor, provider, or native GUI execution.

Exact-head CI, including Docker-native, and the Init, Wrap, Rust,
governance, changelog, and merge-conflict workflows succeeded. Security
remains FAILURE: the OpenCode npm audit reports two moderate findings
through Effect advisory GHSA-chp3-j5qr-2vfr. The security workflow and
affected OpenCode package manifest/lock are byte-identical to current
main, establishing an inherited dependency finding. This is not an
all-green result or a fresh audit of main. No workflow rerun, dependency
downgrade, or advisory override was performed on this branch.

Independent human review and integration remain required. No
self-approval or merge was performed. Other branch publication and
execution holds remain active. All older qualification below belongs to
its recorded historical heads.

---



## Description

Build validation jobs fetched mutable installer scripts, and the pinned
commitlint action still declared a mutable Docker image tag. This pins
that image digest, verifies workflow-tool archives and cached binaries,
and replaces the Docker bootstrap scripts with pinned, verified sources.


## Type of Change

- [x] Bug fix



## Changes Made

- Preserve Rust 1.95.0, minimal/rustfmt/clippy options, Node 24, npm
12.2.1, and OpenCode 1.17.8.
- Preserve Debian userland architecture detection, Rustup ARM fallback,
and OpenCode x64 AVX2/baseline selection.
- Use an official Node image pinned by manifest digest; retain
npm/corepack trees and explicit runtime libraries.
- Add offline bootstrap tests for failed downloads, corrupt bytes,
unsupported targets, symlinks, and option forwarding.


## Testing

- [x] Offline bootstrap tests pass (stdlib unittest, 16 cases).

- [x] Ruff lint/format pass for the two new test files; shell syntax and
whitespace checks pass.
- [x] Exact-head hosted CI passed, including platform tests and
Docker-native, Init, and Wrap build/container checks.


### Test Output

```text

python3 -m unittest discover -s tests/test_install -p 'test_*bootstrap.py'

................

Ran 16 tests in 0.770s

OK

```



## Real Behavior Proof

- Environment: Ubuntu 24.04 under WSL, exact candidate
4ee38e8619.
- Exact command / steps: Run the unittest discovery command above.
Separately stream the recorded release archives and official Node image
layer through SHA-256 and inspect their tar headers.
- Observed result: Invalid bytes stop before extraction/execution;
fixture platform and CPU cases select the intended archives. Actual
workflow-tool/OpenCode archives and the Node layer match published
digests. The Rustup x64 binary matches its vendor checksum; all nine
embedded target checksums match vendor records.
- Not tested: No live model/provider behavior or unexercised
architecture is claimed. Local bootstrap fixtures use mocks; the hosted
Docker/build checks below exercised the actual pinned installation
paths.


## Runtime Rollout Safety

- Rollout-managed feature(s): None; CI/build bootstrap only.

- Minimum rollout channel: Not applicable.

- Stable/default behavior changed: Build inputs become pinned; proxy
defaults, Rust 1.95.0/components, npm 12.2.1 and OpenCode 1.17.8 stay
unchanged. Node remains on the 24 LTS line with a fixed image digest.
- Kill switch / disable path: Revert the maintenance change through
review; do not bypass checksum failures.
- Unsafe override required: None for this exact reviewed candidate.

- Qualification impact: The exact-head hosted checks below passed.
Existing PR heads retain their separate security/qualification holds
until main is remediated and their own gates are refreshed.
- Rollback path: Revert this maintenance PR if build compatibility
regresses.


## Review Readiness

- [x] I performed a self-review.

- [x] This PR is ready for human review.



## Checklist

- [x] New security regression tests are included.

- [x] CHANGELOG.md is unchanged.



## Additional Notes

Static independent code review found no defects. No merge or
self-approval is requested. Completed historical CI evidence is retained
within its original scope; this change qualifies future installer
execution separately.


Initial hosted validation of b2592de8d stopped at rustup filename
dispatch. Follow-up 4ee38e861 retains the required rustup-init basename
in a private directory and adds the reproducing regression test. All
nine latest applicable hosted workflows passed on the corrected head.


### Hosted validation on 4ee38e861

- [CI: platform tests and Docker-native
build/install/compose/wrap/init](https://github.com/headroomlabs-ai/headroom/actions/runs/42352878789):
success.
- [Wrap
E2E](https://github.com/headroomlabs-ai/headroom/actions/runs/42352878762),
[Init
E2E](https://github.com/headroomlabs-ai/headroom/actions/runs/42352878760),
[Init Native
E2E](https://github.com/headroomlabs-ai/headroom/actions/runs/42352878767),
and
[Security](https://github.com/headroomlabs-ai/headroom/actions/runs/42352878768):
success.
- Governance, changelog, Rust and merge-conflict checks also passed. The
older cancelled governance duplicate was superseded by a successful run.


Independent human review is required. No self-approval or merge has been
performed.




### Local-action metadata coverage follow-up



`38337d8be` adds `.github/actions/**` to both code and workflow filters.
The normal pytest suite now checks the vendored commitlint metadata
structure and immutable Docker digest; this is separate from actionlint
workflow parsing. Six focused CI regression tests pass, including a
filter regression that failed before the fix. Independent delta review
found no issues. `38337d8be` now has successful latest applicable CI,
Wrap E2E, Init E2E, Init Native E2E, Security, Rust, Changelog Guard,
Merge Conflicts, and PR Governance runs. The successful runs above
remain historical evidence for `4ee38e861`.




Current-head
[CI](https://github.com/headroomlabs-ai/headroom/actions/runs/42360858297),
[Wrap](https://github.com/headroomlabs-ai/headroom/actions/runs/42360858271),
[Init](https://github.com/headroomlabs-ai/headroom/actions/runs/42360858296),
[Init
Native](https://github.com/headroomlabs-ai/headroom/actions/runs/42360858178),
and
[Security](https://github.com/headroomlabs-ai/headroom/actions/runs/42360858352)
passed. Independent human review remains required; no self-approval or
merge.


<!-- maintainer-current-main-qualification -->

## Current-main qualification



Published head `9381378ffb07e466acef6a57eb39322aa84d4582` includes
upstream main `bb8d18a56abb07ca7e811235c86ea6b626eb1f8b` and is
mergeable. All nine exact-head workflows succeeded; all 53 jobs are
terminal success or explicit skips, including CI Docker-native,
wrap/init and native-init validation. Local metadata/release checks: 61
passed; 16 Linux-only bootstrap tests skipped on Windows. Remediation
installer/action sources are unchanged by the clean main integration.


Independent human review and merge are required. No self-approval or
merge performed. This PR does not lift the inherited
execution-provenance hold on main or other branches before human
integration.
<!-- /maintainer-current-main-qualification -->



### Maintainer current-main refresh (a2bcbd101)

Published `a20f072a238a1f8de422adf6a25d3f9d664151e4` incorporates
upstream main `a2bcbd101b1391debfd218ec8c63cb72d2bc240a` through a clean
merge. All 13 previously screened CI provenance remediation files are
byte-identical to prior published head
`9381378ffb07e466acef6a57eb39322aa84d4582`; no
installer/action/remediation logic was rewritten. Fresh focused checks:
61 passed, 23 platform-specific shell cases skipped on Windows. No
vendor installer, Docker image or downloaded binary was executed
locally. Earlier Linux bootstrap and hosted evidence retain their
original scope.

Fresh exact-head hosted validation completed successfully: all 10
observed workflow runs succeeded; all 56 checks are terminal successful
or explicitly skipped. Ready for independent human review on this
head/current main. This remediation branch alone is permitted to run its
screened checks; inherited execution/publication holds on main and other
PRs remain until independent human integration. Independent review is
required; no self-approval, merge or release publication.

---------

Co-authored-by: Jerrett Davis <JerrettDavis@users.noreply.github.com>
2026-11-10 21:02:42 -06:00

281 lines
4.5 KiB
Plaintext

# fastembed model cache (auto-downloaded ONNX weights, ~30 MB+).
# Should NEVER be committed — bloats the repo significantly.
.fastembed_cache/
**/.fastembed_cache/
# Local Kompress ONNX export artifacts (scripts/export_kompress_v2_onnx.py).
# Hundreds of MB each — published to HuggingFace, never committed.
/onnx/
# Private scripts (contain credentials). Allowlist checked-in helpers below.
scripts/
!scripts/
scripts/*
!scripts/install.sh
!scripts/install-rustup.sh
!scripts/install-opencode.sh
!scripts/install.ps1
!scripts/version-sync.py
!scripts/sync-plugin-versions.py
!scripts/changelog-gen.py
!scripts/verify-versions.py
!scripts/verify-ruff-version.py
!scripts/normalize_release_pr_bodies.py
!scripts/pr-governance.py
!scripts/bootstrap-windows-dev.ps1
!scripts/codeql_triage.sh
!scripts/build_npm_release_assets.mjs
!scripts/build_python_release_smoke.py
!scripts/release_smoke_all.py
!scripts/verify_npm_release_assets.mjs
!scripts/tests/
!scripts/README.md
!scripts/repro_codex_replay.py
!scripts/eval_output_shaper.py
!scripts/fixtures/
!scripts/fixtures/*.json
!scripts/record_fixtures.py
!scripts/build_rust_extension.sh
!scripts/install-git-hooks.sh
!scripts/smoke_issue_327.py
!scripts/refresh_model_limits.sh
!scripts/audit_wheel_glibc_symbols.py
!scripts/replay_codex_ws_load.py
!scripts/export_kompress_v2_onnx.py
!scripts/refresh_tool_hashes.py
!scripts/record_kompress_fixtures.py
!scripts/record_code_compressor_fixtures.py
!scripts/qualify_cargo_dependencies.py
# Rust / Cargo build artifacts
/target/
**/target/
Cargo.lock.bak
# Swift SDK (separate repo)
swift/
# Local planning docs (never commit)
ENTERPRISE_HARDENING.md
# Audit/scan outputs (contain security findings — never commit)
bandit_result.txt
pip_audit_result.txt
ruff_result.txt
reqs.txt
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
pytest_cache/
# Translations
*.mo
*.pot
# Environments
.env
.env.*
!.env.act.example
!.env.example
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
.python-version
# Node.js dependencies (never commit vendored deps)
node_modules/
# Local release smoke outputs
release-assets-local/
# Secrets and API keys - NEVER commit these
*.pem
*.key
secrets.json
credentials.json
.secrets
api_keys.txt
.anthropic
.openai
# IDE and editors
.idea/
.vscode/
*.swp
*.swo
*~
.project
.pydevproject
.settings/
*.sublime-project
*.sublime-workspace
.spyproject
.spyderproject
# Jupyter Notebook
.ipynb_checkpoints
*.ipynb
# macOS
.DS_Store
.AppleDouble
.LSOverride
._*
# Thumbnails
Icon?
._*
# Windows
Thumbs.db
ehthumbs.db
Desktop.ini
# Linux
*~
# Local configuration
local_settings.py
*.local.py
*.local.json
*.local.yaml
# Database files
*.db
*.sqlite
*.sqlite3
# Log files
*.log
logs/
log/
# Temporary files
tmp/
temp/
*.tmp
*.bak
*.swp
# Benchmark results (keep framework, not results)
.benchmarks/
benchmark_results.json
benchmark_results/
examples/vertex_gemini_benchmark/results.json
# DeepEval cache
.deepeval/
# Headroom specific
.headroom/
.claude/.headroom_wrap_*.json
.claude/.headroom_wrap_settings.lock
headroom.db
headroom_*.db
*.jsonl
!tests/fixtures/*.jsonl
docker/differential-network-capture/captures/
# Documentation build
docs/_build/
site/
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Ruff
.ruff_cache/
# pyright
pyrightconfig.json
# Editor backup files
*~
\#*\#
.\#*
# Local git worktrees (isolated feature branches)
.worktrees/
# Local development configuration
CLAUDE.md
# Vitals provenance data
.vitals/
# Separate private repos — never commit here
headroom-managed/
# Local act testing (never commit test tokens)
/.env.act
.actrc.local
# Release metadata artifact
.releaseetadata
# uv lockfile: regenerated locally; not committed
uv.lock
# Rust extension `.so` symlinks placed by `scripts/build_rust_extension.sh`
# into the `headroom/` package dir for local development. The real binary
# lives in `crates/headroom-py/python/headroom/`; this is the dev overlay
# that lets `import headroom._core` resolve when the source `headroom/`
# package shadows the maturin overlay on sys.path.
/headroom/_core.*.so
/headroom/_core.so
.tokensave
.codebase-memory/