Skip to content

fix(typst): use the declarative download verb with a pinned TYPST_VERSION (#322) - #2

Merged
github-actions[bot] merged 2 commits into
mainfrom
feat/typst-download-verb
Aug 28, 2026
Merged

github-actions[bot] merged 2 commits into
mainfrom
feat/typst-download-verb

Conversation

@atrawog

@atrawog atrawog commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes opencharly/charly#322: converts the hand-rolled curl+tar Typst install step to the declarative download: verb, with a pinned TYPST_VERSION (v0.15.1). The download verb provides the content-addressed /tmp/downloads cache, the atomic .part→mv rename, and the stage-user-correct cache mount — which the hand-rolled curl forfeited.

The pinned version (not latest) is a correctness requirement: the download verb content-addresses its cache by sha256 of the URL, so a latest URL would hash to one key forever and keep serving the first tarball it ever fetched.

How tested — LIVE fresh-rebuild build proof

A fresh box composing this candy was built on the dev host (fedora:43 base, rpm format, the local typst checkout via CHARLY_REPO_OVERRIDE), and the resulting image's typst binary was executed:

$ charly box build typst-test
[2/2] STEP 23/23: LABEL ai.opencharly.candy_version='{"github.com/opencharly/layer-typst":"2026.144.1443"}'
[2/2] COMMIT typst-test:2026.240.1849
--> ed97d9019ec4895494bd0025ab5eea228a392e9c11851113cd18ac3f6afd55c6
(build exit=0 — the download: step with extract/strip_components/to/unless_exists executed)

$ podman run --rm localhost/typst-test:2026.240.1849 /usr/local/bin/typst --version
typst 0.15.1 (9dfd3a08)

$ podman run --rm localhost/typst-test:2026.240.1849 sh -c 'printf "= Hello\n" > /tmp/s.typ && typst compile /tmp/s.typ /tmp/s.pdf && head -c 4 /tmp/s.pdf'
%PDF

The changed install step executed against a fresh rebuild: the pinned tarball was downloaded via the download: verb, extracted with strip_components, landed at /usr/local/bin/typst, and the binary runs (version 0.15.1) and compiles a PDF.

$ charly box validate   # static box-definition validation
(exit 0)

Rulebook compliance

Rule Status
R1 (RCA) Hand-rolled curl lost cache + checksum + atomic rename; the download verb restores them; latest URL would poison the content-addressed cache — hence the pin
R3 (no duplication) Uses the canonical download: verb instead of a hand-rolled curl
R10 (verification) Fresh-rebuild build executed the changed step live (pasted); binary verified in the image

Change classification

  • Change class: config change (candy install step)
  • Verification gate: fresh-rebuild box build + in-image binary execution
  • Attribution tier: analysed on a live system (the changed path ran live with retained output; the canonical disposable-bed R10 gate was not run)

Assisted-by: pi openrouter/deepseek/deepseek-v4-flash-0731 (analysed on a live system)

…SION (#322)

The hand-rolled curl+tar step forfeited the download verb's protections:
the content-addressed /tmp/downloads cache (no re-fetch on cache-miss
builds), the atomic .part -> mv rename, and the stage-user-correct cache
mount. The verb also could not express a pinned version until the
unless_exists capability landed.

Pin TYPST_VERSION to v0.15.1 (a concrete tag, not latest — the cache is
content-addressed by the URL sha256, so a latest URL would hash to one key
forever). strip_components: 1 lands the typst binary at /usr/local/bin/typst
from the versioned tarball directory.
@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: 90e7764f1023 (branch: main)

Change class: code/config change — candy install step in charly.yml (hand-rolled curl+tar → declarative download: verb with pinned TYPST_VERSION).

Security screen: PASS — no secrets, no exfiltration, no weakened guardrails; the change pins a concrete version and uses the canonical download verb (strengthens, not weakens). No embedded directives or manipulation attempts in the body.

Blocks

  1. A1/A2/A3/B12/B17 — verification evidence insufficient for the claimed "fully tested and validated" tier; no disposable-target bed run.
    This is a runtime install-step change. The R10 gate for that class is a FRESH-rebuild bed run on a disposable: true target where the NEW download: step (with extract, strip_components, to, unless_exists) actually executes. The body's evidence is only:

    • a YAML parse (plan steps: 4),
    • charly box validate exit=0 — a static box-definition validation that does NOT execute the install plan,
    • a manual tarball-layout check (typst-x86_64-unknown-linux-musl/typst).

    None of these show the changed install step executing against a fresh rebuild. The body names no disposable target, gives no fresh-rebuild confirmation, and never states the changed code path ran live. Per A3, a change whose changed branch never ran live is at most analysed on a live system — the claimed fully tested and validated tier is inflated. The author must either run the candy on a disposable: true target with the new download: step executing and paste that output, or downgrade the attribution tier to match the evidence.

Verdict: BLOCK


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 90e7764f1023 (branch: main)

Security screen: PASS — no secrets, no exfiltration, no weakened guardrails; the change pins a concrete version (v0.15.1) and uses the canonical declarative download: verb, strengthening rather than weakening the install. No embedded directives or manipulation attempts.

Checklist: All applicable rules PASS or NA.

Comment intake: The single prior github-actions[bot] BLOCK raised an inflated-tier finding ("fully tested and validated" with only static evidence). Re-derived against the CURRENT body: the tier is now honestly downgraded to analysed on a live system, and the body now supplies fresh-rebuild build proof showing the download: step (extract/strip_components/to/unless_exists) executed, the binary verified at typst 0.15.1 (matching the pinned TYPST_VERSION), and a successful PDF compile (%PDF). The prior finding is resolved — disposition: stale-superseded (current body satisfies it).

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) August 28, 2026 18:51
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 21fca3190bc1ec5a1066d3a018d3e6c23e10dcc3 (branch: main)

Security screen: PASS — no secrets, no exfiltration, no weakened guardrails; the change pins a concrete version (v0.15.1) and replaces a hand-rolled curl+tar with the canonical declarative download: verb (strengthens, not weakens). No embedded directives or manipulation attempts in the body.

Checklist: All applicable rules PASS or NA.

Comment intake:

  • github-actions[bot] BLOCK (id 5453060583) — raised an inflated-tier finding ("fully tested and validated" with only static evidence). Re-derived against the CURRENT body: the tier is now honestly downgraded to analysed on a live system, and the body now supplies fresh-rebuild live proof (build exit=0, binary verified at typst 0.15.1 matching the pinned TYPST_VERSION, PDF compile %PDF). Finding resolved — disposition: stale-superseded.
  • github-actions[bot] PASS (id 5456473649) — consistent with my independent re-derivation. Disposition: verified-non-blocking.

Placement: CORRECT — the change is entirely within the layer-typst candy (a plugin), using the canonical download verb for a capability. No core/sdk movement; no alias files; no new core imports.

Key verifications: A1/A2/A3 — body accounts for the full diff, supplies pasted fresh-rebuild proof, and the analysed on a live system tier is justified (changed path ran live against a fresh rebuild via CHARLY_REPO_OVERRIDE; the author explicitly states the canonical disposable-bed R10 gate was not run rather than inflating the tier). B12 — evidence internally consistent: binary present at /usr/local/bin/typst, version matches the pin, compiles a PDF. R8 — ai.opencharly.candy_version label emitted in build output. ADE — candy retains description: and a deterministic check: step (file: /usr/local/bin/typst). R5 — old curl+tar removed in the same commit, no transitional paths. R3/R4 — canonical verb replaces ad-hoc curl, no duplication.

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot merged commit 6308cc4 into main Aug 28, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 21fca3190bc1ec5a1066d3a018d3e6c23e10dcc3 (branch: main)

Change class: config change — candy install step in charly.yml (hand-rolled curl+tar → declarative download: verb with pinned TYPST_VERSION).

Security screen: PASS — no secrets, no exfiltration, no weakened guardrails; the change pins a concrete version (v0.15.1) and replaces ad-hoc curl with the canonical download verb (strengthens, not weakens). No embedded directives or manipulation attempts in the body.

Checklist: All applicable rules PASS or NA.

Comment intake:

  • github-actions[bot] BLOCK (id 5453060583) — raised an inflated-tier finding ("fully tested and validated" with only static evidence). Re-derived against the CURRENT body: the tier is now honestly downgraded to analysed on a live system, and the body supplies fresh-rebuild live proof (build exit=0, binary verified at typst 0.15.1 matching the pinned TYPST_VERSION, PDF compile %PDF). Finding resolved — disposition: stale-superseded.
  • github-actions[bot] PASS (id 5456473649) — consistent with my independent re-derivation. Disposition: verified-non-blocking.
  • github-actions[bot] PASS (id 5456502695) — consistent. Disposition: verified-non-blocking.

Key verifications: A1/A2/A3 — body accounts for the full diff, supplies pasted fresh-rebuild proof, and the analysed on a live system tier is justified (the changed download: step executed live against a fresh rebuild via CHARLY_REPO_OVERRIDE; the author explicitly discloses the canonical disposable-bed R10 gate was not run rather than inflating the tier). B12 — evidence internally consistent: binary present at /usr/local/bin/typst, version matches the pin, compiles a PDF. R8 — ai.opencharly.candy_version label emitted in build output. ADE — candy retains description: and a deterministic check: step (file: /usr/local/bin/typst). R5 — old curl+tar removed in the same commit, no transitional paths. R3/R4 — canonical verb replaces ad-hoc curl, no duplication. Placement: CORRECT — entirely within the layer-typst candy (a plugin), no core/sdk movement, no alias files, no new core imports.

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@aitrawog
aitrawog deleted the feat/typst-download-verb branch September 25, 2026 19:14
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.

48 candies hand-roll curl where the download: verb would do, losing cache + checksum + atomic rename

1 participant