Skip to content

test(settings): pin composer#23 declared-key activation - #24

Merged
Xuepoo merged 1 commit into
mainfrom
ctx-0010/fix-settings-activation
Oct 19, 2026
Merged

Xuepoo merged 1 commit into
mainfrom
ctx-0010/fix-settings-activation

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Summary

composer#23 recorded activation aborting on Bitty 0.0.24 with
E_SETTINGS_UNDECLARED for newline. The five declarations landed in
de75a3f (PR #20); the runtime matrix installed c9e94c4, a stale
pre-declaration branch, so main was already past the defect, but the
empty-settings and explicit-value activation paths were not pinned against the
declared key set.

This PR adds tests/settings-declarations.test.ts.

What the suite pins

  • The manifest [settings] key set equals exactly the keys registration
    reads, derived from the entry point (M.DEFAULT_KEYS plus open_chord)
    rather than a hand-maintained list.
  • Declared kinds and shipped defaults match the Lua fallbacks.
  • Activation succeeds with an empty settings file and with no settings
    bridge values at all, routing the shipped default chords (Enter inserts,
    Ctrl+Enter submits).
  • Explicit newline/submit values are honored.
  • The declared-key model stays closed, the shape the host turns into
    E_SETTINGS_UNDECLARED.

Verification

  • just check locally: all gates pass, 86 pass / 0 fail across 6 files.
  • Runtime evidence for the merged declarations already exists: the pinned
    retest installed composer at c2e8249 and activation logged
    plugin 'bitty-terminal.composer' active (5 commands, 3 events).

Closes

Closes #23

Priority: P1 | Area: architecture | Labels: bug, P1, area:architecture | Milestone: v0.1.0 | Task: CTX-0010

composer#23 reports activation aborting on Bitty 0.0.24 with
`E_SETTINGS_UNDECLARED` for `newline`. The five declarations landed in
`de75a3f` (PR #20); the runtime matrix installed `c9e94c4`, a stale
pre-declaration branch, so main was already past the defect while the
empty-settings and explicit-value activation paths were not pinned against
the declared key set.

Add `tests/settings-declarations.test.ts`:

- the manifest `[settings]` key set must equal exactly the keys
  registration reads (`M.DEFAULT_KEYS` plus `open_chord`), derived from the
  entry point instead of a hand-maintained list;
- declared kinds and shipped defaults must match the Lua fallbacks;
- activation must succeed with an empty settings file and with no settings
  bridge values at all, routing the shipped default chords (Enter inserts,
  Ctrl+Enter submits);
- explicit `newline`/`submit` values must be honored;
- the declared-key model must stay closed, which is the shape the host
  turns into `E_SETTINGS_UNDECLARED`.

Task: CTX-0010
Closes #23
@Xuepoo Xuepoo added this to the v0.1.0 milestone Oct 19, 2026
@Xuepoo Xuepoo added bug Something isn't working P1 area:architecture labels Oct 19, 2026
@Xuepoo
Xuepoo merged commit 707b010 into main Oct 19, 2026
7 checks passed
@Xuepoo
Xuepoo deleted the ctx-0010/fix-settings-activation branch October 19, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:architecture bug Something isn't working P1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

composer fails activation on 0.0.24: settings keys are undeclared

1 participant