Skip to content

Admission cleanup: remove dead conflict helpers, name media keys in verdicts - #1323

Merged
malpern merged 1 commit into
masterfrom
chore/admission-cleanup
Oct 20, 2026
Merged

malpern merged 1 commit into
masterfrom
chore/admission-cleanup

Conversation

@malpern

@malpern malpern commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Cleanup pass after #1322 (review §4.4h).

Removed (dead once the engine became the only implementation)

  • RuleCollectionsManager.resolvableCollectionConflict — resolved conflict parties by name; the save path has used mappingConflictContext(for:) (by id, from engine verdicts) since 4b. Its test file goes with it.
  • RuleCollectionsManager.conflictWithCustomRules — no production caller since 4a; its three tests removed.
  • AdmissionVerdictPresenter.oneLine — unused.
  • SessionCapsRuntimeSupport.startupFailureMessage — a shim that only delegated to SessionConfigurationRefusal.message.

Clarified

  • Presenter sentences name media keys and Caps Lock as the user knows them ("sends Volume Up", "Key conflict on Caps Lock") through the one existing table, LayerMappingBuilder.mediaKeyDisplayLabel; other keys keep their Kanata names.
  • MappingConflictContext doc comment points at the real builder.
  • Doc records why KeyPathError.MappingConflictInfo stays (the save gate's error type, names not ids, lives in KeyPathCore; produced from verdicts in exactly one place).

Tests

KEYPATH_TEST_ENFORCE_CLEAN_SUMMARY=1 Scripts/run-tests-safe.sh: 5,776 passed (10 dead tests removed), 0 app warnings/errors, 0 build warnings. check-accessibility.py clean.

🤖 Generated with Claude Code

…erdicts

Delete what the engine made dead: resolvableCollectionConflict (resolved
parties by name; the save path has resolved by id via mappingConflictContext
since 4b) and its tests, conflictWithCustomRules (no production caller since
4a), the presenter's unused oneLine, and the startupFailureMessage shim that
only delegated to SessionConfigurationRefusal. Presenter sentences name media
keys and Caps Lock as the user knows them through the existing
LayerMappingBuilder.mediaKeyDisplayLabel table.

See docs/architecture/rules-admission-review.md §4.4h.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T12:31:29.742260Z 60be6b2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@claude

claude Bot commented Oct 20, 2026

Copy link
Copy Markdown

Review: no actionable correctness, reliability, or security findings in this diff.

  • The removed symbols (resolvableCollectionConflict, conflictWithCustomRules, oneLine, startupFailureMessage) look dead per the PR description. The diff doesn't show their callers, so the green build is what confirms that.
  • The new keyLabel is applied consistently to the conflict title, the conflict explanation, and describe(.emits). The updated test expectations match.
  • Coverage nit: SaveTimeConflictResolutionTests is deleted. It covered the old name-based resolvability rules: disabled parties, synthetic parties such as the leader key and chord groups, a single distinct collection, and empty input. These cases now live in mappingConflictContext(for:), and the diff doesn't show tests for them. If none exist elsewhere, consider porting a few. The synthetic-party and disabled-collection cases are the ones most likely to regress.
  • Coverage nit: keyLabel has no direct unit test for the caps and Caps mapping or for the fallback to the raw Kanata name. A small test would lock in the "Key conflict on Caps Lock" wording the docs promise.
  • Nit: the reflowed line in rules-admission-review.md ("only place ... is worded; the lifecycle coordinator ...") is now very long. Consider re-wrapping it.

🤖 Generated with Claude Code

@malpern
malpern merged commit 32b789b into master Oct 20, 2026
6 checks passed
@malpern
malpern deleted the chore/admission-cleanup branch October 20, 2026 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant