Skip to content

_edison_capture.py is documented as vendored byte-identical; it differs in every sibling repo #389

Description

@realmarcin

scripts/research_trait_edison.py:9 states:

the response-capture plumbing (_edison_capture.py) is vendored byte-identical across the Mech repos.

It isn't. Measured against main in each sibling, for a 527-line file:

CommunityMech         160 differing lines
MediaIngredientMech    32 differing lines
CultureMech            differs

No copy matches. The invariant is asserted, load-bearing in how people reason about the file, and already violated — and nothing checks it: check_vendored_sync.sh's FILES list covers validate_id_label_correspondence.py, chem_formula.py and the three test_id_label_*.py, not this.

Why it surfaced

The reviewer of #388 declined to fix a stale docstring at _edison_capture.py:21 — which still calls {stem}-citations.md the thing that "matches the falcon citations.md sidecar", an artifact #388 deletes — on the grounds that the file is vendored and a one-repo edit would cost more than the staleness. The conclusion was right and the reason was wrong: the file has already diverged, so there is no byte-identical invariant left to protect.

That changes what the fix is. It is not "edit carefully in lockstep"; it is "decide whether this file is shared at all, and either make that true and checked, or stop claiming it".

Same class as #209 and #377

Three instances now of an invariant that is stated in a comment and enforced by nothing:

The first two are "shared but unprotected". This one is "documented as shared, and isn't". Worth deciding together rather than one at a time.

Cheap first step

Whatever the decision, research_trait_edison.py:9 should stop asserting byte-identity while it is false — a reader currently uses it to conclude that editing the file is dangerous, which led to exactly that call on #388.

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