Skip to content

Commit 8cc1051

Browse files
committed
feat: introduce oliphaunt
Oliphaunt-History-Repair-Candidate: 0b2ce46
1 parent 07a9054 commit 8cc1051

2,122 files changed

Lines changed: 523228 additions & 47857 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
name: add-oliphaunt-extension
3+
description: Add, update, promote, or remove an Oliphaunt PostgreSQL contrib or external extension, including source pins, build recipes, explicit target support, evidence, SDK metadata, release products, carrier identities, and package verification. Use whenever extension catalog, compatibility, packaging, or supported OS/runtime claims change.
4+
---
5+
6+
# Add Oliphaunt Extension
7+
8+
Make support claims fail closed. A runtime target existing does not prove an extension supports that target.
9+
10+
## Classify
11+
12+
- contrib: source is PostgreSQL 18. The SQL member belongs to the single
13+
`oliphaunt-extension-contrib-pg18` distribution product at
14+
`src/extensions/contrib/`; that product is `runtime-bound` and is linked to
15+
both liboliphaunt runtimes. A contrib member does not own a leaf `VERSION`,
16+
changelog, `release.toml`, tag, or registry identity.
17+
- external-public: source uses an immutable upstream commit, packaging versioning is `upstream-bound`, and runtime versions are compatibility metadata rather than release coupling. `release.toml` is the active public-product boundary.
18+
- external-deferred: keep `build = true` and `stable = false`, record the concrete blocker in both promotion metadata and `publication-blocker.toml`, and qualify the declared target profiles without creating or retaining `release.toml`, `VERSION`, `CHANGELOG.md`, registry carriers, public SDK entries, or release assets.
19+
- blocked and not buildable: keep it out of both the requested build set and promoted/public catalogs, and record the concrete blocker.
20+
21+
Keep the SQL extension name distinct from the release product id and upstream project name.
22+
23+
## Implement
24+
25+
1. Add or update source pins, checksums, patches/dependency recipes, and Moon
26+
metadata. For a public external extension, also maintain its product-local
27+
`release.toml`, `VERSION`, and empty first-release `CHANGELOG.md`. Every
28+
public or deferred external extension must own
29+
`upstream-license-data.json` beside that metadata. Freeze exactly the source
30+
identities and license/notice rows used by that extension, include only the
31+
referenced content-addressed blobs, and audit those bytes against the clean
32+
pinned checkout. Never put independently versioned extensions into one
33+
shared legal-data file. For a deferred external extension, omit all three
34+
release files and retain a validated `publication-blocker.toml`; candidate
35+
outputs must remain job-local and absent from publication catalogs and
36+
locks. Promotion must retain the product-local legal closure while adding
37+
release state; removal must remove the closure only when neither public nor
38+
deferred qualification still consumes it. For a contrib member, update the canonical `postgres18.toml` inventory and the
39+
shared contrib product metadata; never create leaf release state. Check
40+
whether the upstream project operates an authoritative HTTPS Git mirror.
41+
When it does, record that reviewed endpoint as `mirror_url` and prove that
42+
it serves the exact pinned commit; never infer a mirror or use a community
43+
fork merely for availability.
44+
2. Declare every supported and intentionally unsupported carrier in `targets/artifacts.toml`. Include evidence references; never rely on derived defaults.
45+
3. For an active public product, declare the stable Cargo façade plus native,
46+
mobile, WASIX portable/AOT, npm, and Maven carriers actually required by the
47+
owning release product. Contrib members use the shared bundle carriers and
48+
retain exact nested member paths/checksums; public external extensions use
49+
their independent carriers. Deferred extensions declare qualification
50+
target profiles, not carrier identities. Let size-required Cargo package
51+
parts remain dynamic implementation carriers.
52+
4. Regenerate the shared extension model:
53+
54+
```sh
55+
tools/dev/bun.sh src/extensions/tools/check-extension-model.mjs --write
56+
cargo run -p xtask -- assets verify-committed
57+
```
58+
59+
If and only if the verification reports that source pins, patches, recipes,
60+
compiler inputs, or binary producer code changed, refresh it with
61+
`cargo run -p xtask -- assets input-fingerprint --write` and then verify again.
62+
Version, changelog, registry coordinate, and `targets/artifacts.toml` edits are
63+
package-envelope changes and must leave it unchanged. `--write-evidence`
64+
regenerates claims only; it never creates or updates an observed passing run.
65+
66+
5. Verify the model and release graph:
67+
68+
```sh
69+
tools/dev/bun.sh src/extensions/tools/check-extension-model.mjs --check
70+
tools/dev/bun.sh tools/release/release-check.mjs
71+
```
72+
73+
When source acquisition or `mirror_url` changes, also run the source-fetch
74+
fault suite, validate the real manifest, and perform one live exact-commit
75+
fetch from each newly declared endpoint. The canonical upstream must remain
76+
the durable origin and every transport must resolve to the same immutable pin.
77+
78+
6. Build the exact extension artifacts for all declared published targets. Require package-shape, archive safety, checksums, runtime load/create, restart, and dump/restore evidence where the target contract promises them. The exact-SHA CI lane must run `src/extensions/tools/collect-wasix-evidence.sh` against portable and host-AOT artifacts from that same workflow run. Only that collector may record `wasix-full-lifecycle-v1`; its immutable record must identify the exact commit, tree, workflow run, attempt, and job, and qualification must pass `--require-current-evidence`.
79+
7. Run a clean local-registry install for each ecosystem façade. For a contrib
80+
bundle, select at least two members and prove that only those nested members
81+
are staged even though one target carrier contains all contrib bytes. Also
82+
combine one contrib member with an independently versioned external member.
83+
Confirm target selection fetches only the expected carriers and an
84+
unsupported target fails with a useful error. Verify each carrier's derived
85+
license and notice profile; a passing profile check is not legal advice or
86+
certification of comprehensive legal compliance.
87+
88+
## Review
89+
90+
Reject the change if a declared target lacks a produced artifact/evidence row, an actual package lacks a declared identity, an external extension is runtime-version-coupled, or generated SDK support tables disagree. Also reject a deferred extension if it appears in Release Please, release semantic product ownership, the publication graph or lock, a public SDK/runtime feature, or an uploaded artifact. Report upstream source identity separately from Oliphaunt package version.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: "Add Oliphaunt Extension"
3+
short_description: "Add or update a supported PostgreSQL extension"
4+
default_prompt: "Use $add-oliphaunt-extension to add or update an Oliphaunt PostgreSQL extension."
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
---
2+
name: qualify-oliphaunt-change
3+
description: Select, run, and diagnose Oliphaunt local and GitHub CI qualification for code, package, extension, SDK, policy, workflow, or release changes. Use before merge/release, when checks are slow or duplicated, or when an exact commit must be proven publishable.
4+
---
5+
6+
# Qualify Oliphaunt Change
7+
8+
Use the repository graph to select work, but require the full exact-SHA gate for releases.
9+
10+
## Local feedback
11+
12+
1. Inspect the diff and ask Moon for affected projects/tasks. Do not infer affected products from directory names alone.
13+
2. Run formatting/static checks and focused unit/package tests first. Run expensive producer/E2E lanes only when their inputs or release contract changed.
14+
3. If the diff intentionally changes WASIX binary-semantic inputs (source pins,
15+
patches, build recipes, the WASIX toolchain, or producer code), refresh the
16+
committed fingerprint before qualification with
17+
`cargo run -p xtask -- assets input-fingerprint --write`. Do not refresh it
18+
for version, changelog, package-description, smoke-expectation, or
19+
target-envelope-only changes. See `docs/maintainers/assets.md`.
20+
4. For any release, package identity, workflow, version, or extension change, run:
21+
22+
```sh
23+
tools/dev/bun.sh tools/release/release-check.mjs
24+
cargo run -p xtask -- assets verify-committed
25+
tools/dev/bun.sh src/extensions/tools/check-extension-model.mjs --check
26+
```
27+
28+
The canonical `release-check` runs the live repository-structure and uncached
29+
repository-graph policies before release metadata and mutation tests. Its
30+
uncached `release-tools:check` Moon task is the single hosted graph-validation
31+
owner; `graph-tools:check` remains a focused local target and
32+
`graph-tools:generate` is the sole writer of `target/graph`. Do not substitute
33+
the policy unit tests: they prove the classifiers but do not scan the candidate
34+
tree.
35+
36+
For source-acquisition policy or a source `mirror_url`, run
37+
`tools/dev/bun.sh test tools/policy/source-fetch-core.test.mjs` and
38+
`tools/dev/bun.sh tools/policy/fetch-sources.mjs all --validate-only`. Prove a
39+
new endpoint with a live exact-commit fetch, but keep reachability out of the
40+
deterministic unit gate. Qualification must show bounded canonical-to-mirror
41+
failover, exact-pin rejection, canonical durable origin, and transactional
42+
preservation of an existing checkout when every endpoint fails.
43+
44+
5. For any workflow or local-action change, run
45+
`bash tools/policy/check-workflows.sh` before waiting for CI. This is the
46+
repository's exact pinned `actionlint` plus `zizmor` gate and its workflow
47+
behavior tests; running `actionlint` alone is not sufficient. If the direct
48+
release job graph, job permissions, protected environment, dispatch input,
49+
or continuation dependency changed, also push the exact candidate to a
50+
disposable branch and dispatch one supported `publish-dry-run` compiler
51+
probe. Require GitHub to materialize the direct job graph, then cancel it
52+
before expensive qualification and delete the probe branch. The local gate
53+
cannot prove hosted environment-secret resolution or dispatch-time graph
54+
compilation.
55+
When a release workflow shell block or a shell script transitively reached by
56+
`release-check` changes, run the complete gate with GNU Bash 3.2, matching
57+
`/bin/bash` on the `macos-26` release runner. On macOS, omit the override;
58+
elsewhere, point `OLIPHAUNT_BASH3` at a maintained local Bash 3.2 build:
59+
60+
```sh
61+
bash3="${OLIPHAUNT_BASH3:-/bin/bash}"
62+
case "$bash3" in
63+
/*) ;;
64+
*/*) bash3="$(cd "$(dirname "$bash3")" && pwd -P)/$(basename "$bash3")" ;;
65+
*) bash3="$(command -v "$bash3")" ;;
66+
esac
67+
"$bash3" -c '((BASH_VERSINFO[0] == 3 && BASH_VERSINFO[1] == 2))'
68+
PATH="$(dirname "$bash3"):$PATH" \
69+
OLIPHAUNT_TEST_BASH="$bash3" \
70+
"$bash3" tools/dev/bun.sh tools/release/release-check.mjs
71+
```
72+
73+
This behavioral gate is authoritative for Bash 3.2 `set -u` empty-array
74+
semantics; a syntax check or a source-pattern check is not a substitute.
75+
6. Declare runner capabilities on the narrowest Moon task that needs them. Use
76+
`ci-rust` for Cargo, rustc, rustfmt, or another Rust-toolchain command;
77+
`ci-maintainer-tools` for the pinned tools installed by
78+
`tools/dev/bootstrap-tools.sh`; and `ci-android-sdk` for Android SDK work.
79+
Capabilities propagate through task dependencies. The planner keeps
80+
capability-bearing checks dedicated and combines only compatible static
81+
checks into bounded shards.
82+
7. Treat a hosted runner-image pin as a toolchain dependency. Never introduce a mutable `*-latest` alias; after changing an explicit runner pin, inspect the image delta and run the platform binary contract for every affected release target.
83+
84+
For a WASIX Docker, APT snapshot, or bootstrap trust change, also run the
85+
product-owned fault test and source verifier before the expensive build:
86+
87+
```sh
88+
bash src/runtimes/liboliphaunt/wasix/assets/build/docker/install-pinned-apt-packages.test.sh
89+
tools/dev/bun.sh tools/policy/fetch-sources.mjs wasix-runtime --verify-only
90+
cargo run -p xtask -- assets source-spine --strict-local
91+
```
92+
93+
Then build the pinned Dockerfile from a clean builder context. Require a
94+
successful TLS-verified snapshot transaction and the exact declared wasixcc,
95+
Clang, and Binaryen versions; a source-spine/static check alone does not prove
96+
that the pinned trust chain still reaches the snapshot service.
97+
98+
For an SDK change, run `moon run sdk-contracts:check`, then run every affected
99+
SDK's `package` target in one Moon invocation. SDK package targets own their
100+
same-project `check` and `test` dependencies, so this is the compact product
101+
gate without the platform artifact or E2E matrix. Set `MOON_BASE` and
102+
`MOON_HEAD`, then select SDK project IDs with
103+
`moon query projects --affected --downstream deep --tags sdk --tasks package`.
104+
Pass the exact `<project>:package` targets to `moon run`; a workspace-wide
105+
`:package` selector also selects non-SDK products and is not this lane. Confirm
106+
ownership with
107+
`moon query tasks --project <sdk-project> --id package` when changing task
108+
topology. Never replace the product task with a narrower native command: for
109+
example, `cargo test -p oliphaunt --lib` excludes Rust executable tests under
110+
`src/bin/**`, while `moon run oliphaunt-rust:test` includes the library,
111+
executable, integration, build-crate, and documentation tests. Add
112+
`release-check` when package or registry behavior changes, and run
113+
`moon run extension-model:check` when an extension catalog or generated SDK
114+
extension surface changes. Put new guarantees in a parsed schema/generated
115+
contract, clean-consumer package check, or product-owned behavioral test. Do
116+
not qualify SDK behavior by grepping prose, test names, or
117+
implementation-source spellings.
118+
119+
Advisory cleanup is not qualification. Use
120+
`moon run dev-tools:helper-reference-audit` or
121+
`moon run dev-tools:source-reference-audit` when intentionally looking for
122+
possibly unreferenced helpers or modules, then inspect each result before
123+
removing it. Do not turn reference counts into a required CI gate.
124+
125+
## GitHub qualification
126+
127+
- Identify runs by workflow plus exact `headSha`; never accept “latest successful on branch.”
128+
- The release prerequisite is the non-cancelled `Qualified` gate for that SHA, including required checks, builds, policy, tests, and selected E2E.
129+
- When WASIX or an extension is selected, require the same-run full lifecycle evidence artifact. It must cover every promoted extension in direct, server, restart, materialization, and dump/restore modes and satisfy `--require-current-evidence` for the candidate source digest.
130+
- Ensure artifact attestations and the publication lock reference the same SHA/tree.
131+
- Require artifact evidence for the compatibility floors in
132+
`docs/maintainers/release.md`: inspect Mach-O load commands, Android API/ELF
133+
metadata, and Linux ELF symbol versions rather than inferring support from a
134+
runner or package label.
135+
- Do not rerun duplicate downstream E2E workflows when the same evidence is already part of the required gate.
136+
- On failure, inspect the failing job log and earliest causal error. Fix the cause, push a new SHA, and restart qualification; do not reuse artifacts from the failed SHA.
137+
138+
## Report
139+
140+
List commands and outcomes, skipped lanes with reasons, exact GitHub run/SHA, required gate state, produced artifact/lock evidence, WASIX lifecycle evidence when selected, and residual platform gaps. “Green CI” without exact-SHA and gate names is not release evidence.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: "Qualify Oliphaunt Change"
3+
short_description: "Run and diagnose the appropriate CI qualification"
4+
default_prompt: "Use $qualify-oliphaunt-change to qualify this Oliphaunt change before merge or release."

0 commit comments

Comments
 (0)