Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
341d578
Orchestrator M0: database, event chain, actions, worker, API
pbuncic Oct 11, 2026
87b6f3d
Orchestrator M1: builds reconciled from GitLab and S3; /ops/builds; C…
pbuncic Oct 11, 2026
d3bf607
Orchestrator: open the store read-only without a None write store
pbuncic Oct 11, 2026
6dae741
Orchestrator: read pipeline variables with the ops token; fall back t…
pbuncic Oct 11, 2026
faf6159
Orchestrator M2: failure records, deduplicated issues, signatures, ba…
pbuncic Oct 11, 2026
3a0f864
Orchestrator M3: approvals in the database, standing approvals, revoc…
pbuncic Oct 11, 2026
e786319
Orchestrator M4: certification in shadow, the outside audit copy
pbuncic Oct 12, 2026
faf4be5
Orchestrator M5: the certified set
pbuncic Oct 12, 2026
3be79fa
Orchestrator M6: GitLab and the store through the credentials proxy
pbuncic Oct 12, 2026
c6c4a3d
credentials-proxy: the services' secrets in a second security proxy
pbuncic Oct 12, 2026
46fba5f
console-backend: declare requests and boto3
pbuncic Oct 12, 2026
8699c1a
credproxy: encode path segments once more for the proxy
pbuncic Oct 12, 2026
0194bcb
orch: read a public store with no credentials
pbuncic Oct 12, 2026
9860ce5
orch: replay each CI certification as the worker would certify it (M8a)
pbuncic Oct 12, 2026
49a945a
orch: the replay checks the store through the digest cache
pbuncic Oct 12, 2026
0436efa
orch: the worker certifies pre-approved builds; canary comparison (M8a)
pbuncic Oct 13, 2026
d9e2feb
trust manifests: fetch afresh each run; verify and parse the same bytes
pbuncic Oct 13, 2026
a6a45e2
publish: check packages concurrently; certify reuses the job's BOM
pbuncic Oct 13, 2026
37bba08
forge: wait out GitLab's mergeability recheck before merging an MR
pbuncic Oct 13, 2026
89e88b8
orch canary: compare when the inputs of the architecture agree
pbuncic Oct 13, 2026
d23e522
build: end-of-build reuse summary, with why each package was built
pbuncic Oct 13, 2026
8f39b2a
trust manifests: revalidate with the ETag instead of downloading again
pbuncic Oct 13, 2026
987ecf6
defaults: a chain with a compiler but no build type builds opt
pbuncic Oct 13, 2026
a4e3220
trust manifests: several prefixes, first one with an arch's manifest …
pbuncic Oct 13, 2026
ab35c9c
orch api: the worker's certification on each listed build
pbuncic Oct 13, 2026
57eeb8f
trust: one entry per architecture and hash; a hash alone names no tar…
pbuncic Oct 14, 2026
6b47910
build: relocate a store tarball with this bits' relocate-me.sh, not i…
pbuncic Oct 14, 2026
399bc01
orch outside: recover a restored database from the outside copy; sign…
pbuncic Oct 14, 2026
0598329
orch tests: reconcile fixtures dated yesterday, not a fixed day
pbuncic Oct 14, 2026
a5bd14e
trust: a numbered manifest is never followed by an older one
pbuncic Oct 14, 2026
283769c
orch certify: number each architecture's manifests, after the one in …
pbuncic Oct 14, 2026
1a3e09d
orch certify: withdraw removed BOMs by re-signing with fewer entries …
pbuncic Oct 14, 2026
6c5e03c
orch certify: certify CLI builds by their CLI pre-approval
pbuncic Oct 14, 2026
a2e98d4
orch: M8b switch: own the certified set, write MANIFESTS/, mirror, de…
pbuncic Oct 14, 2026
0497f82
trust: an object two verified manifests certify with different sha256…
pbuncic Oct 14, 2026
922dc40
orch M8b: mirror token in the store writer, idempotent mirror
pbuncic Oct 14, 2026
6314ba6
orch decertify: take out only the requesting group's BOMs
pbuncic Oct 14, 2026
f60e422
bits: leave certification to the orchestrator where the store says it…
pbuncic Oct 14, 2026
a6c2f35
orch: decertify-package, a removal-only action: a group's BOMs replac…
pbuncic Oct 14, 2026
8968840
compliance --enforce: decertify the restricted packages, not whole bu…
pbuncic Oct 14, 2026
85539a5
sandbox: on macOS a build writes only its own files
pbuncic Oct 15, 2026
85fa838
orch certify: a new approval signs its own bytes, not a refused run's
pbuncic Oct 16, 2026
56998e6
orch certify: a failed certification fails its architectures too
pbuncic Oct 16, 2026
7de4375
orch certify: a certification overtaken by a withdrawal is made again
pbuncic Oct 16, 2026
ea98983
orch certify: a decision and its architectures in one transaction
pbuncic Oct 16, 2026
791c6c1
orch certify: the store's sequence guards every write
pbuncic Oct 16, 2026
deac625
orch certify: every signature is an event; the daily limit counts them
pbuncic Oct 16, 2026
7129bfc
orch decertify-package: name the groups that still certify the package
pbuncic Oct 16, 2026
31afa1e
orch recover: bring the set up to the outside copy's events
pbuncic Oct 16, 2026
9c98974
build: latest links with /bin/ln, also under the macOS sandbox
pbuncic Oct 16, 2026
a5f1e03
compliance --enforce: fail when the caller administers no group
pbuncic Oct 16, 2026
0ceace2
bits sign: refuse a store whose marker cannot be read
pbuncic Oct 16, 2026
f884ceb
compliance --enforce: ask for the groups before removing anything
pbuncic Oct 16, 2026
fa9df5a
orch withdraw: a failed or refused withdrawal is asked for again
pbuncic Oct 16, 2026
4d0698d
orch certify: repair a half-written manifest
pbuncic Oct 16, 2026
4c79391
ci: upload coverage to Codecov on bitsorg
pbuncic Oct 17, 2026
dd7ec74
docs: builds on --reuse-from need the reused CVMFS paths
pbuncic Oct 17, 2026
2237b07
cvmfs publish: a view's setup.sh sets what the release's modules set
pbuncic Oct 17, 2026
4070e42
cvmfs publish: a release's top-level module points to its complete view
pbuncic Oct 17, 2026
e34dc04
bits setenv/enter/load: a release with a complete view sources its se…
pbuncic Oct 17, 2026
dcd0701
bits: read a bits use profile only when this directory has one
pbuncic Oct 17, 2026
4b40051
bits: pick the environment commands' architecture without Python
pbuncic Oct 17, 2026
565e46c
bits q/enter/load/setenv: no work dir needed for CVMFS modules alone
pbuncic Oct 17, 2026
39aeaa1
bits --community NAME: $BITS_COMMUNITY on the command line
pbuncic Oct 17, 2026
d7b5ecd
Remove bitsenv
pbuncic Oct 17, 2026
491fa89
bits q/enter/load/setenv: CVMFS trees by install dir, and --archive
pbuncic Oct 17, 2026
400e70f
Show package counts, build stages, and source locations
jmcarcell Oct 18, 2026
9348e1c
Document development and build validation guidance for agents
jmcarcell Oct 18, 2026
869868e
defaults variables: export: false keeps a --set of it out of every hash
pbuncic Oct 18, 2026
097a8cb
bits status: resolve the defaults variables, as build does
pbuncic Oct 18, 2026
811cf5b
bits COMMAND --help: the usage names bits, help goes to stdout
pbuncic Oct 18, 2026
54ae5c0
bits -n prune: the -n is prune's own, as after it
pbuncic Oct 18, 2026
00be3b3
bits -h: common options, the commands by group, each one's help
pbuncic Oct 18, 2026
08cc837
cvmfs publish: relocate dependency paths to their own CVMFS paths
pbuncic Oct 18, 2026
5d530b6
bits status: --set, and the defaults and providers as bits build has …
pbuncic Oct 18, 2026
e306359
bits overlay lcg --closure: only the view package's closure
pbuncic Oct 19, 2026
f588543
s3:// stores: list objects with s3cmd ls
pbuncic Oct 19, 2026
6b98e4d
CVMFS modules: the given build type only, never the other one
pbuncic Oct 19, 2026
a5f0bcd
console backend: only public bits_helpers functions; part of bits
pbuncic Oct 19, 2026
c5a641f
console backend tests: failure fixtures dated relative to now
pbuncic Oct 19, 2026
4bcc767
Show absolute build log paths for failed packages (#136)
jmcarcell Oct 19, 2026
540169b
cvmfs publish: no release for a build of the toolchain alone
pbuncic Oct 20, 2026
90a433d
workarea: a patched source tree records the patches' strip levels too
pbuncic Oct 20, 2026
f216ecc
console backend: a build's SBOM for any signed-in user
pbuncic Oct 20, 2026
2ea9678
BOMs record the build's architecture, not the publishing host's
pbuncic Oct 20, 2026
dec28be
orchestrator: writes the console's CVMFS status document
pbuncic Oct 20, 2026
e29ee8b
Keep no-op package progress at debug level and split agent guidance
jmcarcell Oct 21, 2026
314e22a
orchestrator: a build queue, one build per build host
pbuncic Oct 21, 2026
3f2783f
orchestrator: one passkey approves a queued batch's certifications
pbuncic Oct 21, 2026
9f50b02
override: read env variables in caps for override (#139)
m-fol Oct 22, 2026
42cee4a
overrides: say that only the package regex is lowercased
pbuncic Oct 22, 2026
8bef254
orchestrator: what each build's job spent its time on, for the timeline
pbuncic Oct 22, 2026
a906019
bits: a missing Python module says how to install the requirements
pbuncic Oct 22, 2026
1ee3f98
bits status: a recipe's source form as bits build picks it
pbuncic Oct 22, 2026
4b2bbef
bits status --docker: the system packages and the toolchain's hash as…
pbuncic Oct 22, 2026
0f9fc86
Site configuration: the built-in defaults in NN-<name>.yaml files
pbuncic Oct 22, 2026
9efa02c
Publish: stream the tar upload instead of building it in memory
pbuncic Oct 22, 2026
9ad3927
bits trace: who built, published and approved a file on CVMFS
pbuncic Oct 22, 2026
cc4f23f
certify: who built a package, from the build that compiled it
pbuncic Oct 22, 2026
9c7c87d
SBOM report: a build's CycloneDX SBOM drawn by CycloneDX Sunshine
pbuncic Oct 23, 2026
07f11fb
SBOM: CPEs and purls that vulnerability scanners can match
pbuncic Oct 23, 2026
6ef8ba0
SBOM: further CPEs as syft:cpe23, CPE versions without a leading v
pbuncic Oct 23, 2026
31f579f
Orchestrator: vulnerability scans of the builds' SBOMs
pbuncic Oct 23, 2026
2dc63b3
SBOM scans: scan a build again when a newer pipeline publishes it
pbuncic Oct 23, 2026
a3a511f
Build plan before every build; skip build_requires of reused packages
pbuncic Oct 23, 2026
346e73d
fetch_cache: keep the sources a build downloads itself in the store
pbuncic Oct 23, 2026
4ad968c
Offline builds: go on without a read store that cannot be reached
pbuncic Oct 24, 2026
4109ac4
Several read and write stores, each bucket with its own credentials
pbuncic Oct 24, 2026
205681e
publish, certify, gc and compliance over several write stores
pbuncic Oct 24, 2026
f3bf7e9
Record the versions of system packages in the SBOM
pbuncic Oct 24, 2026
786a2f2
Orchestrator: package index, scannability and triage of SBOM findings
pbuncic Oct 24, 2026
d97cbb2
Upgrade plans from the scans; version pins in the SBOM
pbuncic Oct 24, 2026
f12dcb2
bits upgrade: new versions as a recipe overlay, trial builds
pbuncic Oct 24, 2026
99f2822
Revert "bits upgrade: new versions as a recipe overlay, trial builds"
pbuncic Oct 24, 2026
991e080
bits upgrade: set new package versions in the recipes, in place
pbuncic Oct 24, 2026
7615107
CERN builds read lcgapp-bits-testing; a dry run says why it does not …
pbuncic Oct 24, 2026
149b515
Build plan: the store checked in parallel, with progress; a narrower …
pbuncic Oct 24, 2026
dd88bc7
Prefetch only what the plan fetches or builds
pbuncic Oct 24, 2026
db8f5f4
bits upgrade: versions from a CSV plan; a git tag when no tarball
pbuncic Oct 25, 2026
882feda
Build plan: the store not listed for packages already here
pbuncic Oct 25, 2026
9b8af10
bits upgrade: configure generated for autotools recipes taken from git
pbuncic Oct 25, 2026
b22bbb9
bits upgrade: an upstream release tarball before a git tag
pbuncic Oct 25, 2026
1542368
Orchestrator: licence and dependency analysis of the builds' SBOMs
pbuncic Oct 25, 2026
7093eaf
Build queue: no build on a host whose runner is offline
pbuncic Oct 26, 2026
9cc8a51
SBOM: host tools and build-only system packages not counted
pbuncic Oct 26, 2026
5c8ff01
SBOM scans: what only host tools use is not counted either
pbuncic Oct 26, 2026
4c694c7
Build queue: a host's runner found by its tag, not its description
pbuncic Oct 26, 2026
1da63d0
Build queue: jobs traced to hosts by runner id; the pause in /ops/queue
pbuncic Oct 26, 2026
258b087
Triage: a rule for every vulnerability of a package (vuln_id *)
pbuncic Oct 26, 2026
5e534a7
Orchestrator: builds certified once in the store, not after CVMFS
pbuncic Oct 26, 2026
9d69c82
Build plan: certified store listings cached; changed hashes listed in…
pbuncic Oct 26, 2026
5e707ad
printing the built version in the enter command (#142)
m-fol Oct 26, 2026
d380ac1
bits build: the enter hint names the family's latest alias too; docs
pbuncic Oct 26, 2026
d3fc337
Merge pull request #134 from jmcarcell/feat/build-stage-progress
pbuncic Oct 26, 2026
0c3ef2b
CHANGELOG: build stage progress (#134), by @jmcarcell
pbuncic Oct 26, 2026
84834a1
Document development and build validation guidance for agents (#138)
jmcarcell Oct 26, 2026
2b9dd83
AGENTS.md: the project's rules for changes and builds
pbuncic Oct 26, 2026
340e456
Add opt-in symlinks for deployed packages
akritkbehera Oct 15, 2026
6d0f288
Fix shared-package dependency paths in symlink stages
akritkbehera Oct 16, 2026
cfa3bbe
Do not follow symlinks when listing files to relocate
akritkbehera Oct 22, 2026
c9f89e9
Symlink only certified packages in strict mode
pbuncic Oct 26, 2026
98d6430
Relocate references with BSD grep and xargs too
pbuncic Oct 26, 2026
a676122
Plan: do not list symlinked packages in the store ahead
pbuncic Oct 26, 2026
19d3a7d
Record symlinked packages' source in the build manifest
pbuncic Oct 26, 2026
d2b79b7
Move SCRAM staging of symlinked packages to a recipe hook
pbuncic Oct 26, 2026
c8d08c2
Docs: when to use --reuse-from and --symlink-packages-from
pbuncic Oct 26, 2026
c646783
Do not prefetch packages the plan links from a deployment
pbuncic Oct 26, 2026
577f092
CHANGELOG and docs for the orchestration branch
pbuncic Oct 27, 2026
63338f2
Install relocate-references.sh with bits
pbuncic Oct 27, 2026
42b6779
tests: the bits status --docker test names its architecture
pbuncic Oct 27, 2026
5476949
Close the files and sockets that tests reported as left open
pbuncic Oct 27, 2026
e840d2f
ci: no tox-gh-actions on macOS
pbuncic Oct 27, 2026
2af41be
tests: the help tests' python3 runs the test's own venv
pbuncic Oct 27, 2026
e82fd6b
bits q: note the other build type with bash 3.2 too
pbuncic Oct 27, 2026
d5da6cf
Relocate references with grep in the C locale
pbuncic Oct 27, 2026
f00f10a
tests: copy a namespace without Python 3.13's SimpleNamespace(mapping)
pbuncic Oct 27, 2026
64b458a
bits build: every package line starts with ==>, aligned with the stages
pbuncic Oct 27, 2026
5bc2109
SBOM: system package versions also without /etc/os-release
pbuncic Oct 27, 2026
ae461ed
tests: relocation tests work in physical temp paths
pbuncic Oct 27, 2026
fd09ce5
certify, compliance: the console URL from the site configuration too
pbuncic Oct 27, 2026
ed9e522
certify: say why there is no QR code when qrcode is missing
pbuncic Oct 27, 2026
82f5954
docs: where defaults come from, the site configuration
pbuncic Oct 27, 2026
55eaaf0
orchestrator: record certified CLI builds, so they are scanned
pbuncic Oct 27, 2026
32e5e59
orchestrator: each release's risk over time, for the console's chart
pbuncic Oct 27, 2026
bafc62b
providers: a tag that is no branch, tag or commit fails clearly
pbuncic Oct 28, 2026
faae85d
providers: one bits at a time checks out a provider; an unfinished on…
pbuncic Oct 28, 2026
46d8e6f
orchestrator: any signed-in user reads a community's builds, failures…
pbuncic Oct 28, 2026
25ea23e
orchestrator: the build hosts are GitLab's runners, and paused ones s…
pbuncic Oct 28, 2026
cfc31cd
orchestrator: nightly schedules, what they build and when
pbuncic Oct 28, 2026
ad414f1
orchestrator: the nightly schedules fire into the build queue
pbuncic Oct 28, 2026
8dc7f02
orchestrator: what became of each night, the matrix, and Run now
pbuncic Oct 28, 2026
f8dc9f4
orchestrator: an overall admin pauses, resumes and refreshes a build …
pbuncic Oct 28, 2026
b36e4ea
orchestrator: prune a build host to the free space saved for it
pbuncic Oct 28, 2026
c197ca5
orchestrator: the worker's last pass and its failing steps, for admins
pbuncic Oct 28, 2026
4b1c0a3
orchestrator: where a failed build job stopped: build, certify, publish
pbuncic Oct 28, 2026
eaf134c
backend: any admin reads the bits version the runners are set to
pbuncic Oct 28, 2026
0185316
orchestrator: a build's phases name the build host it ran on
pbuncic Oct 28, 2026
5bb2016
orchestrator: a nightly build carries its defaults and its night's day
pbuncic Oct 28, 2026
38cbbb0
orchestrator: a schedule's variants: its matrix is platforms x variants
pbuncic Oct 28, 2026
a2b920c
orchestrator: commit CI, a schedule that follows branches
pbuncic Oct 28, 2026
e1ffdfd
docs: setting up nightly slots and CI builds on push
pbuncic Oct 28, 2026
55c8466
docs: nightly and CI builds in views of their own
pbuncic Oct 28, 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
17 changes: 12 additions & 5 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,23 @@ jobs:
run: tox

- name: Convert coverage information
if: ${{ always() && github.event.repository.owner.login == 'bits' }}
if: ${{ always() && github.event.repository.owner.login == 'bitsorg' }}
run: |
coverage combine .tox/coverage.*
# Codecov only understands XML, JSON and LCOV files.
# Apparently, patching os.readlink in unit tests interferes with
# finding some source files, but our source shouldn't be affected, so
# ignore these errors.
coverage json --ignore-errors -o coverage.json
continue-on-error: true # coverage never fails the check

- name: Upload coverage information
if: ${{ always() && github.event.repository.owner.login == 'bits' }}
if: ${{ always() && github.event.repository.owner.login == 'bitsorg' }}
uses: codecov/codecov-action@v5
with:
files: coverage.json
token: ${{ secrets.CODECOV_TOKEN }}
continue-on-error: true

mac-unittest:
name: mac-python${{ matrix.python-version }}
Expand Down Expand Up @@ -111,26 +114,30 @@ jobs:
# conflicts with the one in o2-full-deps [O2-5580]
brew uninstall --ignore-dependencies --force pkg-config@0.29.2
brew install modules alisw/system-deps/o2-full-deps sapling
python3 -m pip install --upgrade tox tox-gh-actions coverage
# tox -e darwin names its env: tox-gh-actions would only warn.
python3 -m pip install --upgrade tox coverage

- name: Run tests
run: tox -e darwin

- name: Convert coverage information
if: ${{ always() && github.event.repository.owner.login == 'bits' }}
if: ${{ always() && github.event.repository.owner.login == 'bitsorg' }}
run: |
coverage combine .tox/coverage.*
# Codecov only understands XML, JSON and LCOV files.
# Apparently, patching os.readlink in unit tests interferes with
# finding some source files, but our source shouldn't be affected, so
# ignore these errors.
coverage json --ignore-errors -o coverage.json
continue-on-error: true # coverage never fails the check

- name: Upload coverage information
if: ${{ always() && github.event.repository.owner.login == 'bits' }}
if: ${{ always() && github.event.repository.owner.login == 'bitsorg' }}
uses: codecov/codecov-action@v5
with:
files: coverage.json
token: ${{ secrets.CODECOV_TOKEN }}
continue-on-error: true

# Lint with ruff (issue #59). CHECK-ONLY: the ruleset is configured in
# pyproject.toml [tool.ruff.lint] to the real-bug subset (E9/F63/F7/F82), so
Expand Down
85 changes: 85 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Working on bits

## Repository map

- `bits`, `bitsBuild`, and the compatibility wrappers expose the CLI. Some environment commands have shell fast paths in `bits`; check those as well as Python argument parsing when changing CLI behavior.
- `bits_helpers/build.py` coordinates resolution, reuse, source checkout, scheduling, and final synchronization. The generated package build script comes from `bits_helpers/build_template.sh`.
- `bits_helpers/workarea.py` handles source checkout, extraction, and patches; `bits_helpers/download.py` handles downloads and source caches; `bits_helpers/sync.py` implements store backends.
- `bits_helpers/build_progress.py` owns package labels and human-readable stage reporting. `bits_helpers/progress.py` handles CI progress separately.
- Package recipes normally live in separate `*.bits` repositories. Use `tests/testdist` for local recipe fixtures.
- `console-backend/` is a separate Python project with its own README, dependencies, and tests. Root CLI tests do not validate backend changes.
- User documentation lives in `docs/USERGUIDE.md`, `docs/COOKBOOK.md`, and `docs/REFERENCE.md`; keep examples consistent with actual CLI behavior.

## Development and validation

Support Python 3.8 and newer. Check `pyproject.toml`, `tox.ini`, and `.github/workflows/pr-check.yml` before using newer APIs or changing dependencies. Linux and macOS are both supported.

Use an isolated virtual environment with the project's dependencies installed:

```bash
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -e . pytest ruff
```

The runtime dependencies include `boto3` and its `botocore` dependency. Missing them can break test collection as well as store tests. An unrelated installed top-level `tests` package can also shadow this repository's test modules in subprocesses; prefer a clean virtual environment when diagnosing `tests.test_provenance` import errors.

Run the full suite before every commit, not only the tests of the code you changed: a shared mock or fixture can break elsewhere. From the repository root:

```bash
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest -q tests
ruff check .
git diff --check
```

The console backend has its own suite, which the root one does not run:

```bash
cd console-backend && PYTHONPATH=..:.:tests python3 -m unittest discover -s tests
```

Disabling pytest plugin autoload keeps unrelated globally installed plugins out of local runs. Tests are primarily `unittest` based; a focused run can also use:

```bash
python -m unittest discover -s tests -p 'test_build_progress.py'
```

CI uses `tox`, which includes unit tests and integration commands that clone recipes and build packages. See `tox.ini` for the appropriate interpreter environment and external requirements. Use a small fixture package for local build smoke checks; check installed content and failure exit codes, not just successful command startup.

Ruff is a check-only gate with a deliberately limited ruleset. Preserve surrounding style, including the existing two-space indentation in many modules. Do not run a repository-wide formatter or blanket automatic fixes as part of an unrelated change. Never run `ruff check --fix` on the tree: it removes imports kept only to probe availability (such as `psutil` in `args.py`); mark those `# noqa: F401`. Inspect generated package metadata after editable installs and keep unintended generated changes out of commits.

## Build correctness

- Changes to build environments, generated initialization scripts, relocation, or installed layouts can affect every artifact. Review `bits_helpers/build_epoch.py`: bump `BUILD_EPOCH` when artifact contents or compatibility change. `tests/test_build_epoch.py` checks the fingerprint of covered files.
- A reporting-only change to a covered file still needs a refreshed `COVERED_SHA256`, but does not require an epoch bump. Compute the fingerprint with `python -c 'from bits_helpers.build_epoch import covered_sha256; print(covered_sha256())'` and document the decision.
- `bits_helpers/build_template.sh` is formatted with Python's `%` operator. Escape literal percent signs as `%%`, preserve the named placeholders, and validate a generated script when changing shell behavior.
- Preserve real recipe exit codes across `tee` pipelines. Read `${PIPESTATUS[0]}` immediately after the pipeline, before another command overwrites it.
- Exercise source builds, cached archive reuse, and incremental builds when changing shared build-script paths. A successful source build alone does not cover all branches.
- Keep raw source architecture separate from effective installation architecture. Architecture-conditional source entries are resolved with the raw architecture; shared package paths may use an effective architecture.
- A plain build (`bits build`, or aliBuild with a local alidist, no new options) must keep its package hashes, build graph and outputs: no forced rebuild. New behavior is opt-in. New keys in manifests, `.meta.json` and other JSON are additive and read with a fallback.
- An option that changes what a recipe produces must change the package hash, for example through the defaults `env:`, which is hashed; when the option is off it adds nothing, so existing hashes stay the same. How the build host runs a build (sandbox, oversubscription) belongs under the defaults `system:`, which is not hashed.
- `bits-recipe-tools` is a build dependency of nearly every package: a change there rebuilds the whole stack. Fix one package in its own recipe.
- Reuse only what the signed store holds and a signed manifest vouches for. Do not add other reuse sources, such as caches a provider points to.
- Shell code runs on Linux and macOS: use what both GNU and BSD tools accept (`sed -i`, `stat`, `date`).
- Code that deletes state (store objects, buckets, spool directories) runs only on an explicit command or option, never as a side effect of another command.

## Progress and source reporting

- Report build progress through `bits_helpers/build_progress.py` and `bits_helpers.log`, so terminal, debug, parallel and redirected output stay consistent; its module docstring describes the stage markers and package numbering, and `tests/test_build_progress.py` covers them.
- Keep the full command output under `--debug`, and report where sources come from at the point they are retrieved, without changing fallback order, checksum checks or redistribution rules.

## Making changes

- Keep it simple: the smallest change that solves the problem, no design for cases nobody has. Code comments are at most three lines.
- Give long-lived things (modules, tables, environment variables, events) names that say what they are; temporary names only for what will be removed.
- One behavior per commit. Before changing what a file, variable or trigger means, find everything that reads it.
- A new test must be seen to fail without the change. Test code where it runs (a container, a privileged process, macOS); if you could not, say so in the commit message.
- Get an independent review of every code change, from a reviewer who sees the diff but not your reasoning.
- Measure before optimizing: `BITS_TIMING=1` times the phases of `bits load`/`enter`; time other paths the same way rather than guessing.
- Commit messages are at most five lines and say why the change was needed. Do not refer to ADRs: they are not kept in this repository.

## Preparing changes for review

A change in behavior updates the user documentation (`docs/USERGUIDE.md`, `docs/COOKBOOK.md`, `docs/REFERENCE.md`) and `CHANGELOG.md`: one entry under Unreleased, tagged **[Feature]**, **[Fix]** or **[Improvement]**, crediting a contribution as "(from #N, by @user)". New first-party source files start with the SPDX header used elsewhere (`GPL-3.0-or-later`, CERN), except the recipe helper snippets bits hashes.

Check the current branch and the requested PR base before publishing. This repository can have substantial work on non-default branches, so compare against the intended base to keep unrelated commits out of a PR. Describe observed behavior, relevant validation, and any environment limits accurately; distinguish illustrative output from captured build output.
Loading
Loading