Skip to content

build(codegen): optional STR_KILL_PRE fallback to unlock 2.0.x codegen (deferred) #14

Description

@CameronBrooks11

Deferred — do NOT build now

Lane B verdict (design doc): a single committed _constants.py from one pinned
2.1.x SHA is sufficient. All 12 tracked message literals are byte-identical
across 2.0.9.3 → 2.1 → 2.1.1 → 2.1.2 → latest-2.1.2.x → bugfix-2.1.x. Exactly one
tracked macro drifts — STR_KILL_PRE — and only at the 2.0.x↔2.1.x boundary, where
it was introduced (not renamed). gen_constants.py:79-81 raises SystemExit on a
missing wanted macro, so pinning codegen to a 2.0.x ref fails loudly rather than
producing a wrong table. Runtime already degrades gracefully on 2.0.x: the 2.1.x
marker "!! KILL caused by " is a substring of the 2.0.9.3 inlined kill messages,
so substring-based FATAL_MARKERS detection (protocol.py:124) still fires.

Proposed approach (only if 2.0.x codegen is ever actually wanted)

Do not build a per-version _constants/<version>.py matrix — unwarranted for one
optional macro across a major boundary. The cheapest fix is a one-line fallback in
scripts/gen_constants.py: treat STR_KILL_PRE as optional, defaulting to
"!! KILL caused by " when absent. That lets codegen target either line from one
table.

Acceptance criteria (when/if taken)

  • STR_KILL_PRE becomes an optional wanted macro with a default; codegen from a
    2.0.9.3 ref succeeds and produces a correct table.
  • No matrix module is introduced.

Evidence

scripts/gen_constants.py:26-39,57-66,79-81, marlin_host/_constants.py,
marlin_host/protocol.py:124.
Design: working/dialect-and-mock-investigation.md (Later).

Part of #5.

Activity

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions