Skip to content

Restore hermetic with-get gate coverage and add a content-addressed cache #624

Done

Description

@ehartford

Summary

The normal gate no longer hits the live network: the zlib registry case was
unconditionally disabled in 7684668. That restored hermeticity by removing
coverage. The remaining work is to restore offline with-get
resolution/build coverage
and add a content-addressed package cache.

Current state (revalidated 2026-07-15)

build/selfhost.w still contains bs_check_get_zlib_versions, but its call is
commented out with a #623/#624 note. A fresh test run therefore does not
download zlib.

The tradeoff is zero gate coverage of the real package-resolution/build path
that case exercised. Existing project fixtures cover lock and metadata
mechanics, but do not replace a local-registry source package build.

Downloaded/built C packages are still installed under each project's
.with/deps/c/name/version tree. There is no shared content-addressed cache,
so separate projects or cleaned test roots cannot reuse identical fetched
content.

The old comment that environment gating is unavailable is stale:
BuildCtx.env_input and ActionCtx.env_input exist and record build inputs
(see #649). Environment gating is optional here; normal gates must remain
offline regardless.

Work

  1. Add a checked-in minimal package, archive, or file-backed registry fixture
    and run it through the same resolution and source-build machinery as
    with get.
  2. Re-enable the package case in normal tests using only local inputs.
  3. Move immutable downloaded source/archive content into a shared
    content-addressed cache; project-local installation metadata may continue
    under .with/deps.
  4. Test cache hits, hash mismatch/corruption, and clean project restoration.
  5. Keep live-registry smoke tests explicitly opt-in and outside release gates.

The repository's migrated std.zlib can supply real zlib functionality; a gate
test does not need the CDN merely to obtain meaningful compressed content.

Acceptance criteria

  • Normal test gates make no network request.
  • A local fixture exercises package resolution, extraction/build, metadata,
    and project installation.
  • Identical content is reused across clean project roots.
  • Corrupt or mismatched cache entries fail loudly or are safely replaced.
  • Live-network testing is opt-in and cannot affect ordinary gate success.
  • Full build, fixpoint, and test gates pass.

Related

Activity

  1. ehartford commented on Jul 3, 2026

    @ehartford
    ContributorAuthor

    Correction from Eric: zlib is already ported to With and lives in the standard library (lib/std/zlib.w). That strengthens the WWED: the cli-selfhost test doesn't need the network OR the C package registry to exercise with get's resolution+build machinery — a local fixture package (file:// registry path or checked-in archive) does it hermetically; and any test wanting real zlib CONTENT can use std.zlib directly. Live-network c.zlib fetching in the gates is testing curl and the CDN, not With.

  2. added 2 commits that reference this issue on Jul 4, 2026
  3. changed the title [-]Gate suite hits the live network: cli-selfhost-project-tests downloads zlib every fresh :test run[/-] [+]Restore hermetic with-get gate coverage and add a content-addressed cache[/+] on Jul 15, 2026
  4. ehartford commented on Oct 25, 2026

    @ehartford
    ContributorAuthor

    Triage 2026-10-25, with v0.15.3.0 (main a261b65): still open. The registry case is still commented out:

    build/selfhost.w:2885:    // rc = bs_check_get_zlib_versions(ctx, compiler_path, bs_join(output_dir, "get_zlib_versions_case"))
    

    post-release: gate coverage of the with get resolution path through a local fixture package, plus the content-addressed cache; the UAT scenarios exercise real with get flows meanwhile.

  5. added this to the post-v0.16.0 milestone on Oct 28, 2026
  6. added a commit that references this issue on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions