-
Notifications
You must be signed in to change notification settings - Fork 0
INTB-282: add deterministic cross-project wave admission #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d043a44
INTB-282 add deterministic wave admission
hudsonaikins ca6fa19
fix: satisfy changed-code quality gate
hudsonaikins 31f5abb
fix: evaluate Buildkite preflight safely
hudsonaikins bb56688
fix: avoid nullable Buildkite PR dereference
hudsonaikins ccb0ddd
revert: preserve Buildkite PR condition contract
hudsonaikins f21e118
ci: retrigger PR-context Buildkite validation
hudsonaikins eee26c1
fix: admit Buildkite PR-context jobs
hudsonaikins 7426b3e
fix: honor provider-admitted webhook builds
hudsonaikins 57d9deb
fix: delegate Buildkite admission to provider
hudsonaikins f2eab5d
fix: harden wave admission identity checks
hudsonaikins 348706e
refactor: simplify repository base checks
hudsonaikins 71cca4a
ci: route portable gates to macOS M4
hudsonaikins 0324da2
ci: validate supported Git capabilities
hudsonaikins 64fc1e5
refactor: simplify wave timestamp validation
hudsonaikins ae2503e
Fix exact-head review findings
hudsonaikins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| minimum_version="2.50.1" | ||
| maximum_version="3.0.0" | ||
|
|
||
| version_number() { | ||
| local version="$1" | ||
| if [[ ! "$version" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then | ||
| printf 'Tabellio CI requires a semantic Git version; found %s.\n' "$version" >&2 | ||
| return 1 | ||
| fi | ||
| printf '%09d%09d%09d\n' "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}" "${BASH_REMATCH[3]}" | ||
| } | ||
|
|
||
| check_supported_version() { | ||
| local version="$1" | ||
| local actual minimum maximum | ||
| actual="$(version_number "$version")" || return 1 | ||
| minimum="$(version_number "$minimum_version")" | ||
| maximum="$(version_number "$maximum_version")" | ||
| if [[ "$actual" < "$minimum" || "$actual" > "$maximum" || "$actual" == "$maximum" ]]; then | ||
| printf 'Tabellio CI requires Git >=%s and <%s; found %s.\n' \ | ||
| "$minimum_version" "$maximum_version" "$version" >&2 | ||
| return 1 | ||
| fi | ||
| } | ||
|
|
||
| if [[ "${1:-}" == "--check-version" ]]; then | ||
| [[ "$#" == 2 ]] || { | ||
| printf '%s\n' "usage: verify-git-toolchain.sh --check-version <version>" >&2 | ||
| exit 2 | ||
| } | ||
| check_supported_version "$2" | ||
| exit | ||
| fi | ||
|
|
||
| actual_version="$(git version | awk '{ print $3 }')" | ||
| check_supported_version "$actual_version" | ||
|
|
||
| head_commit="$(git rev-parse --verify 'HEAD^{commit}')" | ||
| git merge-base --is-ancestor "$head_commit" "$head_commit" | ||
|
|
||
| ( | ||
| temporary_dir="$(mktemp -d)" | ||
| trap 'rm -rf "$temporary_dir"' EXIT | ||
| git bundle create "$temporary_dir/capability.bundle" --all | ||
| git bundle verify "$temporary_dir/capability.bundle" >/dev/null | ||
| ) | ||
|
|
||
| architecture="$(uname -m)" | ||
| operating_system="$(uname -s)" | ||
| evidence_path="${TABELLIO_GIT_EVIDENCE_PATH:-tabellio-git-toolchain.json}" | ||
| if [[ ! "$architecture" =~ ^[A-Za-z0-9._-]+$ || ! "$operating_system" =~ ^[A-Za-z0-9._-]+$ ]]; then | ||
| printf '%s\n' "Tabellio CI could not record a portable architecture/OS identity." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| printf '{"schemaVersion":"tabellio-git-toolchain/v0.1","gitVersion":"%s","architecture":"%s","os":"%s","capabilities":["bundle-create-verify","merge-base-is-ancestor","rev-parse-commit"]}\n' \ | ||
| "$actual_version" "$architecture" "$operating_system" > "$evidence_path" | ||
| printf 'Git %s supported on %s/%s; required capabilities passed.\n' \ | ||
| "$actual_version" "$operating_system" "$architecture" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # Wave Admission | ||
|
|
||
| Wave admission answers one question before parallel implementation starts: | ||
| which lanes are safe to pull now? | ||
|
|
||
| The manifest binds each lane to explicit Plane, repository, task, base-commit, | ||
| owned-surface, dependency, WIP, and integration-owner evidence. Admission is a | ||
| pure local decision. It does not start tasks, update Plane, call providers, | ||
| merge, deploy, or release. | ||
|
|
||
| ## Contract | ||
|
|
||
| Use `tabellio-wave-manifest/v0.1` from | ||
| `schemas/wave-manifest.v0.1.schema.json`. | ||
|
|
||
| A lane is rejected when: | ||
|
|
||
| | Code | Meaning | | ||
| | --- | --- | | ||
| | `LANE_NOT_READY` | Plane state is not exactly `Ready`. | | ||
| | `WIP_LIMIT_EXCEEDED` | Existing plus requested WIP exceeds manifest limit, capped at three. | | ||
| | `DEPENDENCY_INCOMPLETE` | Declared dependency is not complete. | | ||
| | `MAPPING_MISSING` | Plane, repository, and task mapping cannot be resolved. | | ||
| | `SURFACE_OVERLAP` | Two lanes claim intersecting surfaces in one repository. | | ||
| | `STALE_BASE` | Planned and observed base commits differ. | | ||
| | `INTEGRATOR_MISSING` | Final integration owner does not resolve to a mapping. | | ||
| | `SURFACE_INVALID` | Owned surface is not a safe repository-relative path or `/**` prefix. | | ||
| | `DUPLICATE_IDENTITY` | Mapping, task, lane, or story identity is duplicated. | | ||
|
|
||
| Reason ordering and wording are deterministic. | ||
|
|
||
| ## Demo | ||
|
|
||
| ```bash | ||
| node scripts/tabellio-wave-admit.mjs \ | ||
| --manifest examples/tabellio-wave/accepted-three-repository.json | ||
|
|
||
| node scripts/tabellio-wave-admit.mjs \ | ||
| --manifest examples/tabellio-wave/rejected-overlap-dependency.json | ||
| ``` | ||
|
|
||
| First command accepts three independent Ready lanes. Second rejects overlapping | ||
| Tabellio surfaces and an incomplete dependency with stable reason codes. | ||
|
|
||
| ## Boundary | ||
|
|
||
| Manifest is snapshot evidence supplied by operator or coordinator. Admission | ||
| does not query Plane or Git, and cannot infer links from names or timing. | ||
| Callers must build mappings from authoritative identifiers and refresh observed | ||
| base commits before each admission decision. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| { | ||
| "schemaVersion": "tabellio-wave-manifest/v0.1", | ||
| "id": "intb-282-accepted-demo", | ||
| "capturedAt": "2026-07-31T18:00:00Z", | ||
| "wip": {"limit": 3, "started": 0}, | ||
| "finalIntegrator": {"mappingId": "tabellio", "owner": "Tabellio repository owner"}, | ||
| "mappings": [ | ||
| {"id": "tabellio", "planeProject": "INTB", "repository": "IntelIP/Tabellio", "taskId": "task-tabellio"}, | ||
| {"id": "contexenda", "planeProject": "CTX", "repository": "IntelIP/Contexenda", "taskId": "task-contexenda"}, | ||
| {"id": "vaticor", "planeProject": "VATI", "repository": "IntelIP/vaticor", "taskId": "task-vaticor"} | ||
| ], | ||
| "lanes": [ | ||
| { | ||
| "id": "wave-admission", | ||
| "mappingId": "tabellio", | ||
| "storyId": "INTB-282", | ||
| "state": "Ready", | ||
| "baseCommit": "1111111111111111111111111111111111111111", | ||
| "observedBaseCommit": "1111111111111111111111111111111111111111", | ||
| "ownedSurfaces": ["schemas/wave-manifest.v0.1.schema.json", "scripts/lib/wave-admission.mjs"], | ||
| "dependencies": [], | ||
| "wipSlots": 1 | ||
| }, | ||
| { | ||
| "id": "docx-fixtures", | ||
| "mappingId": "contexenda", | ||
| "storyId": "CTX-25", | ||
| "state": "Ready", | ||
| "baseCommit": "2222222222222222222222222222222222222222", | ||
| "observedBaseCommit": "2222222222222222222222222222222222222222", | ||
| "ownedSurfaces": ["tests/fixtures/docx/**"], | ||
| "dependencies": [{"storyId": "CTX-24", "status": "completed"}], | ||
| "wipSlots": 1 | ||
| }, | ||
| { | ||
| "id": "paper-eval", | ||
| "mappingId": "vaticor", | ||
| "storyId": "VATI-12", | ||
| "state": "Ready", | ||
| "baseCommit": "3333333333333333333333333333333333333333", | ||
| "observedBaseCommit": "3333333333333333333333333333333333333333", | ||
| "ownedSurfaces": ["evals/paper/**"], | ||
| "dependencies": [], | ||
| "wipSlots": 1 | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.