advanced24 min studyLesson 433 in Engineering

Close the build over declared inputs

Expose tools, environment, network responses, and AI assets that can change output while keeping isolation and correctness claims distinct.

On this page

What you’ll understand

  • Enumerate source, toolchain, dependency, configuration, and external-input closure.
  • Explain how hidden host state or network responses undermine the stated build boundary.
  • Separate hermetic input control from code review and runtime behavior.

The same source and lockfile produce different inference images because one host has a different compiler toolkit and another build downloads a changed model file. The build was not defined by source alone. A hermetic design closes over the inputs allowed to affect the output and isolates the action from undeclared host state. That makes reconstruction and comparison more meaningful, while leaving the separate question of whether the declared inputs and resulting program are correct.

Treat tools and configuration as inputs

A useful input inventory includes source revision, compiler and linker, build scripts, package artifacts, base filesystem, target architecture, configuration, and generated-code dependencies. For AI infrastructure, include tokenizer assets, operator generators, native kernels, and any model files incorporated into the release. A version string without a concrete artifact identity can leave part of this set mutable. Local include paths and system libraries can also leak into a build even when the application's package graph is locked. Identify the actual files and tools consulted rather than infer closure from one manifest.

An isolated filesystem and restricted environment can prevent accidental reads from the host, but a container image alone does not prove hermeticity. The action may still contact a network service, read injected environment variables, use host-mounted files, or depend on the current time. Build-system sandbox guarantees have a defined scope and configuration. Test the boundary by removing incidental tools and varying allowed host conditions, while checking which inputs are recorded. A failed build can reveal an implicit dependency that previously went unnoticed because every developer machine happened to provide it.

O=F(S,T,D,C)O=F(S,T,D,C)
O is a build output determined by declared source S, tools T, dependencies D, and configuration C within this illustrative closed boundary. Omitting an actual influencing input makes the stated function incomplete; this is not a proof that F is correct.↔ Scroll wide equations horizontally.

Control network, time, randomness, and secrets

A network fetch during the action introduces response bytes and availability into the input set. An approved prefetch stage can retain verified artifacts before an isolated action executes; alternatively a controlled fetch must be explicitly identified and recorded under the build contract. Disabling network after dependency installation does not erase code or assets already obtained. Time, locale, filesystem iteration order, absolute paths, and random seeds can also affect output. Decide which are semantic inputs and which incidental variations the build should normalize, then verify that relevant tools honor the chosen settings.

Credentials deserve separate treatment. Access to fetch an approved private dependency should not imply that the action can read or export unrelated secrets. Avoid embedding credentials into outputs, logs, or shared caches, and scope the mechanism granting access to the intended stage. A secret that changes output bytes becomes a reconstruction and leakage problem, not a harmless invisible configuration. Signing may be deliberately separated from an otherwise reproducible payload build; document which artifact layer is being compared. Input closure, action isolation, and a signing authority's approval remain distinct mechanisms even when one pipeline orchestrates them.

F(I,e1)≠F(I,e2)⇒the stated invariance needs investigationF(I,e_1)\ne F(I,e_2)\Rightarrow\text{the stated invariance needs investigation}
I denotes the claimed fixed input set and e the host/environment conditions claimed irrelevant. A mismatch exposes an incomplete or nondeterministic boundary for that experiment; matching two runs does not prove every possible environment is irrelevant.↔ Scroll wide equations horizontally.

Verify the boundary rather than naming it

Retain input manifests and build configuration so another controlled environment can attempt reconstruction. Observe file and network access where supported, remove undeclared dependencies, and test cache misses as well as cache hits. A shared cache can hide missing inputs by returning an output created under a different environment. Reassess the boundary when adding a plugin, native extension, or model conversion step. A build that deterministically incorporates a harmful declared input can still be hermetic; source and dependency review, provenance, and execution policy address different claims.

The function lab is a small analogy for an omitted parameter. For each separate view, Reset, set both coefficient a and position x, predict y, then inspect. Compare a=1, x=1 with a=2, x=1: the same x gives different y because a changed. This quadratic instrument is not a build sandbox, compiler, or network monitor. It makes the logical issue explicit: if the declared input list mentions only x, changing a appears mysterious even though the full function is deterministic. A real build inventory must discover the corresponding hidden tools or response bytes through actual evidence.

Budget the inputs a release actually incorporates

A fictional image build requires 20 MB of source, 500 MB of compiler tools, 300 MB of package artifacts, and 2000 MB of model assets, using decimal MB. Its first manifest lists only source and packages. Assume these four categories contain the complete input payload for this exercise.

  1. The actual input payload is 20+500+300+2000=2820 MB. The first manifest covers 320 MB and omits 2500 MB in tools and model assets.

  2. The omitted share by bytes is 2500/2820≈88.65%. This percentage describes payload size, not the probability or impact of a compromise.

  3. Identify and pin the omitted tool and model artifacts, then verify the action can run from the approved input closure. Adding sizes to a manifest without the actual immutable identities and access boundary would not fix the mechanism.

The result

The example reveals 2500 MB of unrecorded input payload. The corrected contract needs their identities and controlled use, not merely a larger dependency count.

Explore the model

Interactive lab

Interactive lab · function

A deterministic result can depend on an omitted parameter

For each view: Reset, set both coefficient a and position x, predict, then inspect. Compare a=1, x=1 and a=2, x=1 in y=ax². Outputs are 1 and 2. This is a mathematical analogy, not a compiler or hermeticity test.

A deterministic result can depend on an omitted parameterThis lab uses only y = ax². Playback traces the curve within the fixed integration interval from 0 to x; it does not estimate numerical error or change the chosen point. Current readings: y at chosen x: 0.608; Tangent slope · 2ax: 1.35; Signed area · ax³/3: 0.182. All parameters are adjustable with the labeled controls below.−2.4−1.201.22.4−9−4.504.59xy(x, ax²)
y = ax²TangentSigned integral
y at chosen x
0.608
Tangent slope · 2ax
1.35
Signed area · ax³/3
0.182
t = 0 s

This lab uses only y = ax². Playback traces the curve within the fixed integration interval from 0 to x; it does not estimate numerical error or change the chosen point. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forKeeping one visible input fixed does not establish a fixed complete input set. Actual builds need evidence of every tool, configuration, and external asset allowed to affect the output.

Check your understanding

A containerized build fetches a mutable model URL during compilation. What is missing from a source-and-lockfile-only input claim?

Try it yourself

A toy build output is y=ax². The manifest records x=2 but omits a. Two runs use a=0.5 and a=1.5. Compute both outputs and explain the input-accounting error.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Square x once, then apply each coefficient.

Compare with the solution

The outputs are 2 and 6. The calculation is deterministic with both parameters, but the manifest omitted a, so its claim that the recorded x alone fixes the output is incomplete. The same reasoning motivates checking real hidden toolchain and environment inputs.

Take it with you

  • Hermeticity concerns a declared and isolated influencing input boundary.
  • Tools, network bytes, AI assets, time, and configuration can escape a source-only description.
  • Input control supports reconstruction without proving semantic correctness or trusted intent.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.