Skip to content

go.work + replace mask sdk/go.mod's spec pin: no superproject bed can fail on a stale pin, so every sdk PR proved only via beds has an unvalidated dependency #324

Closed

Description

@atrawog

A bed run in the superproject cannot fail on a stale spec pin in sdk/go.mod, because it never resolves that pin. Two independent mechanisms guarantee it:

go.work                use ./charly / use ./sdk / use ./spec      <- workspace mode overrides module pins
charly/go.mod:132      replace github.com/opencharly/spec => ../spec

sdk/go.mod:15          github.com/opencharly/spec v0.2026225.1800  <- never consulted by the above

So a bed built in the superproject compiles against the local spec checkout regardless of what sdk/go.mod pins. The gate is real and it is structurally blind to this one class of defect.

Where it bites

Standalone sdk — CI, go test in that repo, and every external consumer resolving the module from the proxy — does resolve the pin. So a PR can be proved green on a full disposable bed and still be unbuildable for everyone outside this workspace.

Live instance: sdk#142 consumes unless_exists, added to #Op by spec#37 and published as v0.2026230.1155. Its go.mod still pins an earlier spec. Superproject beds pass; standalone resolution fails, because sdk/go.mod's spec require carries no replace.

Why this is worth a gate rather than a note

The masking is invisible in exactly the situation where it matters: a consumer PR that adds a new spec dependency is the one most likely to be proved on a bed, and the bed is the artifact everyone treats as decisive. The stronger the proof someone runs, the less likely they are to also run the check that would catch it.

Note the general shape rather than just this instance: a go.work workspace is a development convenience that deliberately overrides published module versions. Anything the workspace supplies locally is a dependency the local gate cannot evaluate — this affects spec today and would affect any future submodule added to use.

What would actually catch it

A standalone resolution check for the contract submodules — GOWORK=off go build ./... in sdk (and spec) with the module resolving from the proxy rather than a sibling checkout — run wherever it binds for everyone rather than for whoever remembers. Deliberately not specifying where; the point of filing is that no gate evaluates the pin at all, and the bed evidence that looks strongest is precisely the evidence that cannot.

Related: #318 (a projection gate that runs nowhere automatic — same shape, different subsystem: the check exists, nothing runs it in a binding place).

Found by a validator on sdk#142 that bumped the pin locally and ran the standalone gate rather than trusting three passing beds. Verified independently here against go.work, charly/go.mod:132, and sdk/go.mod:15.

Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)

Activity

  1. atrawog commented on Aug 28, 2026

    @atrawog
    ContributorAuthor

    Validation (2026-08-28) — RESOLVED

    Verified against current charly main. The masking mechanism is gone: go.work now has only use ./charly (no sdk/spec workspace members), and charly/go.mod has zero replace directives. The sdk and spec modules are resolved from the module proxy at their pinned go.mod requires (the de-submodule cutovers #371/#377). A superproject bed now resolves the same pins an external consumer does.

    Closing as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions