Skip to content

chore(devkit): bump to 1.3.1 + migrate attestation into release-extension seam - #139

Merged
c-vigo merged 3 commits into
devfrom
chore/138-devkit-1-3-1
Jul 17, 2026
Merged

c-vigo merged 3 commits into
devfrom
chore/138-devkit-1-3-1

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Re-scaffolds this repo onto vigOS devkit 1.3.1 (from 1.3.0, direnv mode) and migrates the SLSA build-provenance attestation of dist/index.js out of the standalone attest-release.yml and into the managed release-extension seam, now that devkit 1.3.1 grants the seam a write-token ceiling.

Closes #138 · supersedes the attestation deviation from #106.

Commits

  1. build(devkit): adopt vigOS devkit 1.3.1 in direnv mode — installer re-scaffold + flake pin fix
  2. ci(release): move dist attestation into release-extension seam — attest job added, attest-release.yml deleted

Fix-signature evidence

Seam migration

release-extension.yml gains an attest job (alongside the existing verify-dist backstop):

  • Runs on final releases only (if: ${{ inputs.release_kind == 'final' }}) — mirrors the retired attest-release.yml, which existed to attest published final version tags; RC candidates publish disposable tags and are not attested.
  • Ordering — needs: [verify-dist], so provenance only ever attaches to a bundle already proven fresh at finalize_sha (the commit the published tag points at).
  • Permissions (exactly what it needs, within the ceiling) — contents: read, id-token: write, attestations: write. No packages: write (nothing is published to a registry).
  • Mechanism — actions/[email protected] with only subject-path: dist/index.js (same SLSA build-provenance predicate the prior workflow emitted, per [CHORE] Switch workflow attestation action to actions/attest #70), checking out finalize_sha.
  • attest-release.yml (push: tags: v*.*.*) deleted.

Verification

  • direnv exec . just precommit — full suite green (dev-shell rebuilt on the 1.3.1 toolchain).
  • direnv exec . npm test — 138/138 jest tests pass.
  • actionlint on release-extension.yml + codeql.yml — clean. (Neither actionlint nor zizmor is in this repo's flake hook set or CI; the CI lint job runs the just precommit set. actionlint was run directly from the dev-shell toolchain as the static gate. zizmor is not available in the toolchain.)

Live attestation is NOT verified here. This PR only wires the seam and validates it statically. The attestation can only be exercised end-to-end by the next sync-issues final release running through the devkit release train — that run is the live proof.

Notes for the reviewer

  • Branch name: the planned chore/138-devkit-1.3.1 was renamed to chore/138-devkit-1-3-1 because the repo's no-commit-to-branch naming hook rejects dots in the summary segment (1.3.1), which would have blocked every commit and CI's lint job.
  • CODEOWNERS: the 1.3.1 re-scaffold re-seeded an inert (fully commented) .github/CODEOWNERS placeholder; it was removed to honor the deliberate removal in [CHORE] Adopt vigOS devkit 1.3.0 (direnv) — replace bespoke CI/release stack #106 (net-zero git change).
  • Do not merge — CODEOWNERS/review gate; left ready + green.

c-vigo added 2 commits July 17, 2026 09:48
Re-scaffold from devkit 1.3.0 to 1.3.1 (direnv mode; values resolve from
.vig-os). Pin the vigos flake input to ?ref=1.3.1 and re-lock flake.lock,
fixing the drift where it floated on the devkit default branch.

Retires the codeql.yml push-paths hand patch: devkit 1.3.1 renders the
Node globs natively (**.ts, **.js, **.mjs, **.cjs, .github/workflows/**)
per vig-os/devkit#1142. The managed release.yml extension caller job now
carries the four-scope token ceiling (contents:read, packages:write,
id-token:write, attestations:write) per vig-os/devkit#1144.

Refs: #138
Devkit 1.3.1 (vig-os/devkit#1144) raises the managed release.yml
extension caller job to a contents:read, packages:write, id-token:write,
attestations:write ceiling, so the consumer seam can finally attest. Add
an `attest` job to release-extension.yml that emits an SLSA build-
provenance attestation for dist/index.js on final releases, gated on the
verify-dist job so provenance only ever attaches to a bundle proven fresh
at finalize_sha (the commit the published tag points at). The job
declares exactly id-token:write + attestations:write (no packages:write —
nothing is published to a registry).

Delete the standalone attest-release.yml (push: tags) that carried this
attestation only because the 1.3.0 seam could not obtain the write token.
Live proof comes with the next sync-issues release.

Refs: #138
@c-vigo

c-vigo commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

CI note — one pre-existing, out-of-scope failure

Integration Test / Include closed is red, but it is not caused by this PR and is not the merge gate:

Per traceability, the fixture refresh is not bundled here (out of scope for #138). Suggest a separate test/chore issue to update the include-closed scenario's fixture issue numbers to a currently-open set (or make the filter data-driven).

c-vigo added a commit that referenced this pull request Jul 17, 2026
…#141)

## Summary

The `Integration Test / Include closed` scenario was failing on every PR
(observed on `dev` and on PR #139) due to test-fixture drift, not an
action regression.

The scenario hardcodes `issues-filter: '2,17,4,8'` and its verify step
first asserted **at least one filtered issue is OPEN** (`OPEN_COUNT >
0`), then checked `with-closed >= open-only`. Issues #2 and #17 were
closed by the v0.4.0 release, so all four filtered issues are now
CLOSED, `open-only` count is `0`, and the pre-check fails
unconditionally.

## Fix (approach a — assertion made state-independent)

Rather than chase live issue states, reframe the assertion around the
**durable** invariant: issues **4 and 8 are stably CLOSED** ("closed" is
the natural attractor state — open issues drift closed over time, the
reverse rarely happens). Therefore `include-closed: true` must return
**strictly more** issues than `include-closed: false`, because at least
the closed issues are added while the open-only pass omits them.

- Drop the brittle `OPEN_COUNT > 0` gate (assumed ≥1 filtered issue
stays open).
- Assert `with-closed > open-only` (proves closed issues are added) and
`with-closed > 0`.
- Normalize empty counts to `0` defensively.
- Update the file header to drop the now-false "2,17 must stay open"
contract.

The result holds regardless of how many filtered issues are currently
open, so it will not drift again as more issues close.

## Traceability

Deliberately kept out of PR #139 (devkit 1.3.1 adoption), which did not
touch the integration workflow. This is the dedicated fix.

## Long-term

This fully resolves the drift for the include-closed scenario. The
broader "self-provisioning fixtures" idea noted in #140 remains a
possible future enhancement (a test would create its own issues in known
states rather than relying on any repo issue), but is out of scope here.

Refs: #140
@c-vigo
c-vigo merged commit f93c159 into dev Jul 17, 2026
22 checks passed
@c-vigo
c-vigo deleted the chore/138-devkit-1-3-1 branch July 17, 2026 08:31
c-vigo added a commit that referenced this pull request Jul 20, 2026
#143)

## Summary

Re-scaffolds this repo onto **vigOS devkit 1.4.0** (from 1.3.1, direnv
mode).

> **RC validation:** the `vigos` flake input is pinned to
**`?ref=1.4.0-rc2`** to
> validate the release ahead of the final `1.4.0` tag. This PR is the
live
> consumer proof for the 1.4.0 release train; the pin is bumped to
`?ref=1.4.0`
> (and `flake.lock` re-locked) before merge. **Do not merge while pinned
to rc2.**

Refs: #142 · follows the 1.3.1 adoption (#139).

## Commits

1. `build(devkit): adopt vigOS devkit 1.4.0 in direnv mode` — installer
   re-scaffold + flake pin/lock + CHANGELOG.

## Managed-file deltas (all rendered by `init-workspace.sh`)

- **zizmor baseline**
([vig-os/devkit#1182](vig-os/devkit#1182)) —
new managed `zizmor.yml` (devkit-owned baseline; every entry scoped to a
managed-workflow basename, so a consumer-authored workflow never
inherits an exemption) plus the upstream fixes: `persist-credentials:
false` on the read-only checkouts (`ci.yml`
resolve/lint/test/dependency-review, `codeql.yml`,
`renovate-changelog-build.yml`, `sync-issues.yml`) and the
`sync-main-to-dev.yml` `template-injection` fix (release-app token moved
into step `env:`). Behavior-preserving. `zizmor` is not in this repo's
flake hook set or CI, so the baseline ships as an inert config file
here.
- **CI runner knob**
([vig-os/devkit#1173](vig-os/devkit#1173)) —
`resolve-toolchain` emits a new `runner-json` output from the optional
`.vig-os` `DEVKIT_CI_RUNNER` key; `ci.yml` toolchain jobs (`lint`,
`test`, `commit-checks`, `summary`) resolve `runs-on: ${{ fromJSON(...)
}}`. The key is **absent** here, so `runner-json` defaults to
`["ubuntu-24.04"]` — no runner change.
- **direnv CI shellHook env forward**
([vig-os/devkit#1180](vig-os/devkit#1180)) —
`setup-devkit-toolchain` now diffs the dev-shell env and forwards
`shellHook` vars to `GITHUB_ENV`.
- **`with-native-libs` recipe**
([vig-os/devkit#1181](vig-os/devkit#1181)) —
base `justfile` gains a helper wrapping a command with a scoped
`LD_LIBRARY_PATH` for uvx native wheels.

## Fix-signature evidence

- **Flake pin bumped + re-locked** — `flake.nix` now `vigos.url =
"github:vig-os/devkit?ref=1.4.0-rc2"`; `flake.lock` `vigos` re-locked to
rev `6fe5f770` (= the `1.4.0-rc2` tag commit) with `original.ref =
"1.4.0-rc2"`. Follows-inputs (nixpkgs/flake-utils) unchanged. `.vig-os`
`DEVKIT_VERSION=1.4.0-rc2`, `DEVKIT_MODE=direnv`, `DEVKIT_TAG_PREFIX=v`,
`DEVKIT_FLOATING_TAGS=major,minor` preserved; new `DEVKIT_CI_RUNNER=`
(empty) added.

## Landmines preserved

- **`release-extension.yml` untouched** — the build-provenance
**attestation seam** migrated in #139 (final-release `attest` job) and
the `verify-dist` backstop both survive byte-for-byte (not in the diff;
it is consumer-owned, not a managed file).
- **Integration-test matrix untouched** — `integration-*.yml`,
`js-quality.yml`, `published-tag-smoke.yml`,
`prepare-release-extension.yml` are consumer-owned and unchanged.
- **`justfile.project`, `.envrc`, `flake.nix` customizations preserved**
— `hooksExcludes = [ "^dist/" ]` and `extraPackages` kept; only the base
`justfile` (managed) changed.

## Verification

- `direnv exec . just precommit` — **full suite green** (dev-shell
rebuilt on the 1.4.0-rc2 toolchain; `pymarkdown` now runs as the flake
`language: system` hook per
[vig-os/devkit#1170](vig-os/devkit#1170), the
nix hooks `deadnix`/`statix`/`nixfmt` per
[vig-os/devkit#1171](vig-os/devkit#1171)).
- `direnv exec . npm test` — **138/138 jest tests pass**.

## Notes for the reviewer

- **CODEOWNERS**: the re-scaffold re-seeded an inert (fully commented)
`.github/CODEOWNERS` placeholder; removed to honor the deliberate
removal in #106/#139 (net-zero git change).
- **`.pre-commit-config.yaml` scaffold quirk (worktree-order, not a
devkit defect)**: scaffolding into a fresh worktree *before* the direnv
dev-shell had been loaded meant the flake-generated `/nix/store` symlink
did not yet exist, so `init-workspace.sh` (which treats
`.pre-commit-config.yaml` as a *preserved* file) saw it absent and
copied the hand-managed template. The new direnv flake-hooks opt-in
guard ([#1167](vig-os/devkit#1167)) then
correctly refused to clobber it. Resolved exactly as the guard instructs
(remove the gitignored file → flake regenerates the symlink), yielding
the same flake-generated `.pre-commit-config.yaml` symlink the 1.3.1
checkout carries. The gitignored file is not part of this PR.
- Do **not** merge — CODEOWNERS/review gate; left ready + green. Bump
rc2 → final `1.4.0` before merge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant