Skip to content

docs(scratch): document scratch caches — driver, CLI, config, Go/OCI callers - #108

Merged
raphaelvigee merged 1 commit into
mainfrom
claude/eager-galileo-1ba1q7
Sep 3, 2026
Merged

docs(scratch): document scratch caches — driver, CLI, config, Go/OCI callers#108
raphaelvigee merged 1 commit into
mainfrom
claude/eager-galileo-1ba1q7

Conversation

@raphaelvigee

Copy link
Copy Markdown
Member

Summary

Scratch caches (driver = "scratch") have been buildable and in production use by the Go and OCI plugins for several merged PRs (heph#403, #434, #435), but had never reached these docs — a docs/SCRATCH.md search of this site turned up nothing at all. hephbuild/heph@12b6391 (#437 — the compile/module/OCI-blob cache retrofit, plus making the declaration's path field optional) is what triggered this pass, so it documents the whole feature as it stands on heph's master, not just this commit's incremental diff.

  • New website/docs/concepts/scratch.md — the contract, the driver = "scratch" Starlark fields (path, env, access, version, remote, max_size), choosing access, portability via version, auditing with --no-scratch, publishing/pulling through the remote cache, the heph tool scratch {ls,head,path,rm,push,pull} CLI plus heph tool gc --scratch-max-size/--scratch-max-age-days, and the output/mounted-scratch pitfall. Registered in sidebars.ts.
  • website/docs/reference/configuration.md — new scratch: config block (scope, restoreScopes, seedOnFork).
  • website/docs/plugins/go.md — new "Build and module caches" section: the automatic per-module GOCACHE and shared GOMODCACHE, and heph.go.gocache_addr() for sharing them from hand-written targets.
  • website/docs/plugins/oci.mdoci_pull's shared registry blob cache.
  • Mirrored all of the above into the Claude Code plugin reference twins (plugins/heph-expert/skills/heph/references/{concepts,configuration}.md, plugins/heph-go/skills/heph-go/references/go-plugin.md) per this repo's reference-drift rule.

Every field, CLI subcommand, and config key here was checked against the current source in hephbuild/heph on master (the pluginscratch/gocache/platform.rs drivers, src/commands/tool/scratch.rs, crates/config/src/config_yaml.rs) rather than taken from the PR description alone — one behavior claimed in the PR body (a new parse-time guard rejecting an output glob that reaches a scratch mount) didn't match what the current code and its own tests actually do, so the docs describe the verified behavior (rejected when heph packs the output, naming the mount) instead.

Triggered by

hephbuild/heph#437 — perf(scratch): compile, module and OCI blob caches — and outputs can no longer collect one (commit 12b6391f674de9ac9949bf7de1ad49d58a48f783)

Test plan

  • Docs-only change; no build required per instructions.
  • Reviewer sanity-check: field/flag/config-key names match hephbuild/heph@12b6391 (crates/builtins/src/pluginscratch/mod.rs, crates/config/src/config_yaml.rs, src/commands/tool/scratch.rs, crates/plugin-go/src/plugingo/gocache.rs, crates/plugin-oci/src/pluginoci/platform.rs).

🤖 Generated with Claude Code

https://claude.ai/code/session_01P9GCJXF5CCzPbwfnr8xw9y


Generated by Claude Code

… Go/OCI callers

Scratch caches (driver = "scratch") have been buildable and in production use
in the go/oci plugins for several merged PRs (heph#403, #434, #435) but had
never reached these docs. hephbuild/heph@12b6391 (#437) — the compile/module/
OCI-blob cache retrofit, plus making `path` optional — was the trigger to
close that gap, so this covers the whole feature as it stands on master
rather than just the incremental diff.

- New concepts/scratch.md: the contract, the driver's Starlark fields,
  access/version semantics, --no-scratch auditing, remote push/pull, the
  `heph tool scratch` CLI, and the output/mount pitfall.
- reference/configuration.md: the `scratch:` (scope/restoreScopes/seedOnFork)
  block.
- plugins/go.md: the automatic GOCACHE/GOMODCACHE scratch caches and
  heph.go.gocache_addr().
- plugins/oci.md: oci_pull's shared registry blob cache.
- Mirrored the additions into the heph-expert and heph-go Claude Code plugin
  reference twins per the reference-drift rule.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9GCJXF5CCzPbwfnr8xw9y
@raphaelvigee
raphaelvigee enabled auto-merge (squash) September 3, 2026 08:21
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

⚡ Cloudflare Pages preview

Preview https://ee0db5b5.hephbuild.pages.dev
Commit 10cd6ee

@raphaelvigee
raphaelvigee merged commit 22537ef into main Sep 3, 2026
3 checks passed
@raphaelvigee
raphaelvigee deleted the claude/eager-galileo-1ba1q7 branch September 3, 2026 08:24
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.

2 participants