Repository navigation
ci(apk): cache SDK dl/staging/build trees per target + job timeouts (#370 follow-up) - #385
Conversation
…e#370 follow-up) PR OpenTollGate#370 is marked MERGED on GitHub but none of its content is on `main`: git merge-base --is-ancestor 3f53827 origin/main # false git diff 3f53827^1 3f53827 -- .github/workflows/build-package.yml # 16 insertions(+), 0 deletions(-) Cause: OpenTollGate#370's base was the stacked `ci/trigger-hygiene` branch (OpenTollGate#369). OpenTollGate#369 landed on `main` as the squash db8af35 54 seconds before OpenTollGate#370 merged into that already-merged branch, so OpenTollGate#370's commits were orphaned and `main` never saw them. `main` still has no SDK cache and no timeout on any heavy job except `publish-metadata` (pre-existing since 218cd2d), which means `package-apk` falls back to the 360-minute default. This applies OpenTollGate#370's own delta. One of its 16 lines is NOT applied: OpenTollGate#370 also re-declares a job-level `timeout-minutes: 15` on `publish-metadata`, which `main` already carries at the same job (introduced by 218cd2d, OpenTollGate#97). Taking it verbatim duplicates the mapping key - actionlint: key "timeout-minutes" is duplicated in "publish-metadata" job. Net change: 15 insertions, 0 deletions. - compile-binaries: timeout-minutes: 30 - build-portal: timeout-minutes: 15 - package-ipk: timeout-minutes: 30 - package-apk: timeout-minutes: 90 - package-apk: SHA-pinned actions/cache@v5 step restoring /builder/dl, /builder/staging_dir and /builder/build_dir, keyed apk-sdk-<matrix.sdk>-25.12.0-<hashFiles('packaging/**')> with restore-keys fallback. No other changes.
…n via OpenTollGate#385 CHANGELOG.md's `[v0.6.0-alpha2]` entry (moved out of `[Unreleased]` by OpenTollGate#373) and RELEASE-NOTES.md's "the SDK build tree is cached and every heavy job has a timeout" bullet (rewritten by OpenTollGate#380) both describe OpenTollGate#370 as shipped. It is not on `main`: OpenTollGate#370 merged into the stacked `ci/trigger-hygiene` branch *after* OpenTollGate#369 had already been squash-merged as `db8af35`, so none of OpenTollGate#370's 16 lines were in the tree either document describes. Both entries now name OpenTollGate#385, the PR that carries OpenTollGate#370's content onto `main`, and the changelog entry no longer lists a `publish-metadata` timeout among OpenTollGate#370's additions (that job has carried `timeout-minutes: 15` since `218cd2d`). The release headings, section order and every other line are untouched. Refs OpenTollGate#370, OpenTollGate#339.
|
@felixfelix-bot the actions runners rely on github secrets. How is that handled in the ngit version of the actions runner? |
|
Short answer: ngit-ci does support The mechanism (per the ngit-ci repo). Per-repo secrets are exposed to jobs of a repo whose
Jobs then reference them exactly as on GitHub — Authorization is the difference from GitHub. What that means for this repo. The lane already ported to One caveat specific to us: the nsec in this checkout is not a maintainer of the ngit mirror of this repo, so I can't provision those secrets myself — it needs a maintainer identity (or the maintainer-role mapping established first). Worth knowing before anyone promises the apk/Blossom lane on ngit CI. None of this affects this PR: the cache and timeout changes are GitHub-Actions-side ( |
Does this mean that the builds can only be published by a maintainers npub if the CI runs on the maintainers infrastructure? I'm fine with that constraint, but I want to understand what the constraints are and why they are that way... |
|
Following up on the secrets question with the exact rules, since they're stricter than "a maintainer sets it". Who may cause a secret to be injected ( Consequences worth stating plainly:
Where the plaintext lives ( So what are the constraints, and why? Two separate trust boundaries:
Neither constraint requires the CI to run on the maintainer's own machine. It requires that the publishing identity is a maintainer-controlled key and that the plaintext only exists on infrastructure the maintainers trust, for the shortest possible time. Self-hosting satisfies that trivially; using someone else's runner means trusting that operator with the key unless values are bunker-sealed. For this repo specifically: the package/publish lane would still need |
Are any secrets being leaked to the actions runners that we use on ngit right now in this repo? How is the publishing step of the action handled? |
|
Following this up with what's actually live, since the ngit publish lane is about to be relied on. Audited the coordinator and the workflow trees rather than reasoning from the docs. Are secrets currently exposed to the ngit runners? No — the surface is one secret and it is gated
Residual risks, stated plainly:
How the publishing step is handled on the ngit laneIt's already ported, and the handover between stages is Nostr records instead of CI artifacts — that's what makes the same publish path work on both substrates:
One operational gotcha for anyone iterating on these lanesThe |
Is it using a random nsec_hex in this step or how does it do the publishing step? |
|
One more clarification, since the publish identity matters for provenance: What it is. It's injected from the per-repo secret What that single identity does (six steps):
Four consequences worth designing around:
|
How about we just use a different npub for the time being to unblock the CI and we figure out how to safely use the maintainer's npub at a later point in time? |
|
Review pass against PR-REVIEW.md: The forensic story checks out — I re-ran the checks myself: The mechanics are sound: the cache action is SHA-pinned (immutable ref), and the cache key includes One cross-PR verification ask (not blocking, but it should be demonstrated once Actions is back, or in an ngit run): show that a warm-cache apk build is byte-identical to a cold-cache one. #383 just established byte-level reproducibility for the apk lane with cold, fresh containers; this PR reintroduces carried state into Disposition: land, with the warm/cold byte-equality check as a follow-up. |
Lands #370's content on
main.#370 is marked MERGED on GitHub (2026-08-30T22:43:30Z, merge commit
3f53827a) but none of it is onmain:Why the merge did not carry. #370's base was the stacked
ci/trigger-hygienebranch (#369). #369 landed onmainas the squashdb8af35at 2026-08-30T22:42:36Z — 54 seconds before #370 merged intothat same, already-merged branch, so #370's commits ended up on a dead
branch head and
mainnever saw them.maintoday has noactions/cachestep in this workflow and a
timeout-minutesonpublish-metadataonly,so every
package-apkleg runs against the 360-minute default.This is the gap flagged on #339 (the v0.6.0 release request): a tag cut from
mainbuilds without the SDK build-tree cache and without the apk timeout.What this PR changes
#370's 16 lines, minus one line that is stale on
main:compile-binariestimeout-minutes: 30build-portaltimeout-minutes: 15package-ipktimeout-minutes: 30package-apktimeout-minutes: 90package-apkactions/cache@v5step restoring/builder/dl,/builder/staging_dirand/builder/build_dir, keyedapk-sdk-<matrix.sdk>-25.12.0-<hashFiles('packaging/**')>withrestore-keysfallbackThe one omitted line, and why.
git cherry-pick 3f53827does applycleanly onto
mainand produces 16 insertions — but one of them re-declaresa job-level
timeout-minutes: 15onpublish-metadata, whichmainalready carries for that job (present since
218cd2d, #97; #370's basebranched before it). Taken verbatim that is a duplicated mapping key:
So this branch applies the four new job timeouts plus the cache step:
15 insertions, 0 deletions,
actionlintclean. If you would rather havethe literal 16 lines, cherry-pick
3f53827directly and close this PR — aduplicated YAML key is not something I wanted to land on
mainon thestrength of "the parser probably tolerates it".
Verification
timeout-minuteslands oncompile-binaries(30),build-portal(15),package-ipk(30),package-apk(90) and the pre-existingpublish-metadata(15) — nowhere else, and there are no duplicated mappingkeys anywhere in the file.
Every added line is one of #370's own added lines: a multiset diff of this
branch's added lines against
git diff 3f53827^1 3f53827shows 15 of the 16present and zero lines that are not in #370's delta — the one difference
is
timeout-minutes: 15, exactly thepublish-metadataduplicatedescribed above.
No GitHub Actions run: this repository's last workflow run of any kind is
from 2026-08-27 and nothing is queued for this PR, so the checks above are
the available evidence (local
actionlint1.7.x + PyYAML, both clean).Second commit (docs-only, pushed)
CHANGELOG.mdandRELEASE-NOTES.mdboth described #370's change asalready shipped — the changelog bullet came from #373 (as an
[Unreleased]entry, moved into
[v0.6.0-alpha2]by #380) and the release-notes bullet"the SDK build tree is cached and every heavy job has a timeout" was
rewritten by #380. Neither is true of the tree those documents describe, so
both entries now name this PR as the change that carries #370's content onto
main, and the changelog no longer lists apublish-metadatatimeout among#370's additions. Kept as a separate commit so the CI change can be
cherry-picked on its own, and easy to split into its own PR if you prefer.
Whole-branch diffstat:
Overlap note
Open PR #383 also edits
.github/workflows/build-package.yml(andCHANGELOG.md). This branch touches only the four job headers, the onecache step and two documentation paragraphs — flagging the overlap so the
two can merge in whichever order is convenient.