Skip to content

No precondition that --source is actually the repo --repo names #17

Description

@lorenzoliuzzo

The only prior real run in this host's ledger (2026-07-18T20:29:46Z, issue #4, $0.30, 8 turns) was invoked with --repo MyThingsLab/my-raytracer while --source pointed at my-coder's own checkout. The session spent 8 turns working it out and then correctly refused:

This checkout is confirmed to be the my-coder tool's own repository (origin MyThingsLab/my-coder, README/pyproject all describe my-coder), not MyThingsLab/my-raytracer. [...] Per my own governing rule: "Never touches a repo other than the one named by the issue it was given."

The judgment step saved it, which is the good news. The bad news is that this is the one part of the system that costs money and is non-deterministic, and it was spent re-deriving something git -C <source> remote get-url origin answers for free before any session starts.

Worse, the failure mode when the model does not catch it is silent and expensive: Coder._attempt would branch mycoder/<name>-<issue> off the wrong repo, run a session against unrelated code, and push. The never touches another repo invariant currently rests entirely on the model noticing.

Everything else in my-coder is deterministic-first by design; this precondition should be too.

Acceptance criteria

  • Before opening the workspace, verify the --source checkout's origin remote matches --repo; abort with outcome=skipped and a clear detail if not.
  • No session is launched and nothing is billed when the check fails.
  • An escape hatch for the legitimate case of a source checkout with no origin or a differently-named fork.
  • Tests for match, mismatch, and missing-remote.

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