Skip to content

Hold reasons: a typed hold kind from one shared list, so a new merge.decided reason can't be emitted without its plain words (by design; #816 follow-up) #824

Open

Description

@jayden1711

Outcome: a merge.decided reason can't be emitted without its plain words, by design. Each reason carries a typed hold kind from one shared list. mergeDecision, mergeDecisionFor, mergeOrWait's pushes, combinedGate, rulesetHold, conflictWaitReasons and the weakening reasons draw from it, and src/hold-words.ts is keyed by it. A new kind without words then fails to compile.

Why (measured on #816 at 640b6cd, round-6 review #816 (comment)):

Constraints:

  • mergeDecision's decisions are byte-identical before and after. Only the reason's carrier changes, never what holds.
  • Stored merge.decided events keep their reasons: string[], so older rows still read. The kind is added beside each reason, or derived from it in one place.
  • Once the type makes words compulsory, the source scan in test/first-task-progress.test.ts can shrink to a backstop for untyped writes, or go. Removing it is the owner's call (rule 10).

Deliverable:

- test: test/hold-words.test.ts
- command: |
    npm run typecheck

Acceptance, each with a fail-without test:

  • a new hold kind added to the shared list without words fails npm run typecheck, shown on fixture code;
  • every reason that mergeDecision, mergeOrWait, combinedGate, rulesetHold and conflictWaitReasons emit carries a kind from the list;
  • mergeDecision's output is identical before and after (a snapshot over test/merge-policy.test.ts inputs).

Review point: L3, because it touches the merge policy. Protected, so the owner merges.

Related: #741 / #816 (the card and its words), #706 (plain words for every hold, slice 2's table), #820 (the weakening reason).

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions