Pin the source and report drift separately

A pinned source identifies a repository, a full commit SHA, and a path. The code-snippets design brief14 reads that source from local Git objects. git show documents object inspection.ΒΆ

The proposed snippet keeps its pinned text. Source drift compares only the selected pinned lines with HEAD. Source drift reports a warning. It leaves the pinned text intact and lets the build continue.ΒΆ

Keep HEAD out of the immutable snippet cache. The cache key identifies the pinned source. A separate diagnostic observes source drift.ΒΆ

If a shallow clone does not contain the pinned Git file or commit object, tell the author to fetch history. Do not fetch it during content generation.ΒΆ

This boundary keeps build-time work7 local. The configured registry follows ports and adapters19.ΒΆ

See the glossary for pinned source and source drift.ΒΆ

Sources

  1. git show. Primary source. Reading objects Accessed 2026-10-02.
  2. Code-snippets design brief. Primary source. Pin and drift design Accessed 2026-10-02.

Last changed 2026-10-07 in f1a00f2. Source on GitHub. Change log.

Linked from

  1. Agent guide. An Effect stack so pure (aspirational) Kit Langton will blush.

    Pin the source and report drift separately β€” A pinned excerpt stays fixed while a separate diagnostic compares it with HEAD.

  2. Build and run rat-stack (README.md). What is in the repo, how the example works, and how to run it.

    pnpm sources:fetch imports missing pinned source commits from the configured repository remotes once, including in template children.

  3. Build-time work stays out of requests. Git reads and highlighting produce static assets before the Worker handles requests.

    Pinned sources require no generation-time network fetch.ΒΆ

  4. Change log. What changed in the files served here, newest first.

    Pin the source and report drift separately β€” edited: feat(learn): teach cards 63 to 82 with plain lines, diagrams and snippets

  5. Code snippets quote a pinned source. Shipped design brief: pinned Git objects, typed diagnostics, and one build-only snippet model for both views.

    The package reads pinned sources during content generation.

  6. Full agent guide. An Effect stack so pure (aspirational) Kit Langton will blush.
  7. One snippet model feeds both renderers. HTML and agent Markdown derive their code, repository, commit, path, and line numbers from the same snippet.

    The planned property compares each view with the pinned source.ΒΆ

  8. Rat Stack lore | rat-stack. Short, source-grounded notes on the ideas and decisions behind rat-stack.

    Pin the source and report drift separately β€” A pinned excerpt stays fixed while a separate diagnostic compares it with HEAD.

  9. Source change history (log.md). The generated change log as Markdown.

    Pin the source and report drift separately β€” edited: feat(learn): teach cards 63 to 82 with plain lines, diagrams and snippets