Skip to content

Dockerfile: cache-bust the OGAR clone - #8

Merged
AdaWorldAPI merged 2 commits into
mainfrom
claude/rust-scratch-abi-soa-gsamge
Aug 10, 2026
Merged

AdaWorldAPI merged 2 commits into
mainfrom
claude/rust-scratch-abi-soa-gsamge

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Fixes the reported Docker build failure — "fails on deprecated ogar-blockly crate dependency."

Root cause

RUN git clone --depth 1 https://.../OGAR.git ... in the Dockerfile is verbatim-identical on every build. Docker's (and Railway's) layer cache reuses the first checkout it ever produced, forever — with no signal that it happened. A build run before ogar-blockly was removed upstream (OGAR #260) kept that stale OGAR checkout cached across every deploy since, regardless of what main actually looks like now.

The failure was never in this repo's current source (blockly-abi has depended on ogar-loco alone since b7ee0a4) — it was a Docker layer nothing was telling to go stale.

Fix

Add the standard cache-bust: ADD https://api.github.com/repos/AdaWorldAPI/OGAR/commits/main /tmp/ogar-head.json before the clone. BuildKit re-fetches that URL on every build and conditionally invalidates the layer (and the clone after it) the moment OGAR's main tip actually moves — a real signal instead of an accidental one.

Verification

No dockerd in this environment, so verified by reproducing the container layout by hand: fresh git clone --depth 1 of OGAR main (238d52b, ogar-blockly absent) + git archive HEAD of this repo's tracked files + cargo build --release -p blockly-web — finishes clean in ~20s.


Generated by Claude Code

claude added 2 commits August 7, 2026 19:41
The dependency was inverted. `ogar-blockly` gave this repo exactly three
things — a concept id, an EMPTY Vocabulary impl, and a floor constant —
plus re-exports of ogar-loco. Everything substantive already came from
ogar-loco directly. So OGAR hosted a Blockly-specific crate, and
`ogar-vocab`'s Blocks table named this repo's executor crate in a const:
the substrate knowing its consumer by name, in another repository.

`VocabularyRegistry` exists so that inversion is unnecessary. This repo
IS the Blockly consumer, so it declares its own slot and plugs it at
boot; the substrate never learns Blockly exists. Uniqueness is enforced
at the plug (`ConceptTaken`), not by a central table that would have to
carry every frontend's name.

New `blockly-abi::palette`: PALETTE_CONCEPT (0x1717), BlocklyPalette,
plug_into, render_classid, DEVICE_FAMILY_FLOOR. Everything else that came
via the re-export now names ogar-loco directly, so no crate is imported
for the sole purpose of forwarding another crate's types — which is what
made the old dependency look load-bearing when it was not.

Dependency: `ogar-blockly` dropped from all four manifests. This repo now
depends on exactly one external crate, `ogar-loco`.

Also fixes the Dockerfile, which was broken by the pins-forbidden flip
and whose comment still claimed a git dependency needing no token. With
path deps, Railway's single-repo build context has no `../OGAR` and cargo
fails at MANIFEST LOAD before compiling — measured, exit 101. The builder
now clones the public sibling into the layout the manifest expects.
`--depth 1` on the default branch is deliberate: cloning a moving branch
is what keeps this pin-free, and the trade (reproducible only against
OGAR HEAD at build time) is stated in the file rather than discovered.

75 tests green; clippy -D warnings clean; fmt scoped with -p.
`RUN git clone --depth 1 https://.../OGAR.git ...` is verbatim-identical on
every build, so Docker's (and Railway's) layer cache reuses the FIRST
checkout it ever produced forever -- with no signal that it happened. A build
that ran before the ogar-blockly removal merged upstream (OGAR #260) kept
that stale OGAR checkout cached across every deploy since, still carrying
`crates/ogar-blockly` and whatever manifest shape went with it, regardless of
what main actually looks like now. That is the "fails on deprecated
ogar-blockly crate dependency" symptom: the failure was never in this repo's
current source, it was in a Docker layer nothing was telling to go stale.

Add the standard bust: `ADD https://api.github.com/repos/AdaWorldAPI/OGAR/
commits/main /tmp/ogar-head.json` before the clone. BuildKit re-fetches that
URL on every build and conditionally invalidates the layer (and the clone
after it) the moment OGAR's main tip actually moves -- a real signal instead
of an accidental one.

Verified by reproducing the container layout by hand (no dockerd in this
environment): fresh `git clone --depth 1` of OGAR main (238d52b, ogar-blockly
absent) + `git archive HEAD` of this repo's tracked files + `cargo build
--release -p blockly-web` -- finishes clean.
@cursor

cursor Bot commented Aug 10, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_6ca3c1b2-685c-4167-b46b-037054fcf9ed)

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review August 10, 2026 22:52
@AdaWorldAPI
AdaWorldAPI merged commit 23424ef into main Aug 10, 2026
2 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

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