Repository navigation
fix(manifest): declare copy-mode settings keys (#16) - #17
Merged
Merged
Conversation
Activation failed with E_SETTINGS_UNDECLARED because init.lua read row_count and max_bytes while the manifest had no [settings]; the open command was never registered. Declare exactly the two read keys (int, defaults 10 and 4096), catch denied reads and fall back to the shipped defaults with one bounded diagnostic, pin bitty-plugin-sdk 3ea8e58 for [settings] linting plus the MockHost declared-key gate, and add static/runtime regressions that fail without the declarations.
The SDK pin cited 3ea8e58 as PR #152's merge commit, but that SHA is the merge commit of PR #155; PR #152 merged as f6fc2f76, which 3ea8e58 only contains as its parent. Pin f6fc2f76 so the provenance claim matches the settings-lint and MockHost declared-key surface the plugin needs, and regenerate the lockfile integrity hash. Mirror the corrected attribution in README, repo.toml, TODO, the manifest header, and the live-parity comment; the manifest header no longer cites d915535 as the linter pin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Priority: P1 | Area: plugin | Labels: fix,P1,area:plugin | Milestone: v0.1.0 | RFC: N/A | Task: N/A
Closes #16
Summary
Activation on Bitty 0.0.24 failed with
E_SETTINGS_UNDECLARED:lua/copy-mode/init.luareadrow_countandmax_bytesthroughbitty.settings.get, butbitty-plugin.tomlhad no[settings]table, so activation aborted andbitty-terminal.copy-mode:openwas never registered.row_count = { type = "int", default = 10 },max_bytes = { type = "int", default = 4096 }.pcall; a denied read (or absent settings bridge) keeps activation alive on the shipped defaults and records one bounded diagnostic (settings_denied,settings_diagnostic, at most 160 bytes) instead of aborting or failing silently.bitty-plugin-sdktof6fc2f763aa398c0b9bb33fadfe06f0b86dbc0d2, the merge commit of PR #152 (CTX-1225), whose manifest linter accepts[settings]and whose MockHost enforces declared keys. The previous3ea8e58pin was the merge commit of PR #155 (which contains #152'sf6fc2f76as its parent); pinning #152 directly keeps the provenance exact and drops the unrelated #155 surface. The olderd915535(PR #144) predates[settings]and rejected the section.tests/settings-declarations.test.ts: static parity betweensetting("<key>", ...)call sites and manifest declarations (fails with the declarations removed — verified red: 4 failing tests), declared defaults matchingDEFAULT_ROW_COUNT/DEFAULT_MAX_BYTES, activation registering and dispatchingopen, and the denied-read diagnostic path.repo.toml(stalecompat bitty >=0.5line corrected to>=0.0.24,<0.1).Note: #14 documents the compat-floor failure and is already closed by #15; it is a different root cause, so this PR closes #16 instead.
Review follow-up (F1)
The independent review found the SDK provenance claim wrong:
3ea8e58is the merge commit of PR #155, not PR #152. PR #152 merged asf6fc2f76, which is3ea8e58's parent. This head pinsf6fc2f76directly, so the claim matches the commit and the lockfile hash was regenerated. Thebitty-plugin.tomlheader no longer citesd915535as the linter pin, and README, TODO,repo.toml, and the live-parity comment carry the corrected attribution.Verification
just checkgreen: prettier, markdownlint 0 issues, metadata, hygiene, portable paths, plugin lint 0 errors / 1 pre-existing high-risk warning, luaparse, lua-control,bun test56 pass / 0 fail.gitleaks detect --source .— no leaks.[settings]from the manifest fails the new regression (4 fail), then restored.