Repository navigation
Queue resolved-state harmonisation, protocol doc sync, and review denylist additions - #15
Merged
Merged
Conversation
deriveNeedsYou, which builds the homepage ranked list and the sidebar bell
count, tested one terminal key fewer for decisions than the protocol defines.
A decision the reader had dismissed left the Decisions and Actions tab
immediately and went on occupying the homepage, and counting towards the bell,
until the card aged out of its window. Every dismissal recreated it.
There were two definitions of "resolved" in one repository:
deriveCardsTab -> isDecisionResolved / isActionResolved, the full set.
deriveNeedsYou -> answered and superseded for decisions, all three for
actions.
Both derives now call the shared helpers. One definition of resolved, and the
surfaces cannot drift apart again. Restating the helper's keys inline is what
allowed the drift twice over, so the call replaces the restatement rather than
being added alongside it.
THIS LIFTS A DELIBERATE FREEZE, ON PURPOSE.
The comment at that check described an Option-1 freeze on the homepage and bell
contract, and it was real rather than an oversight. It came from the landing
that added dismiss, supersede and the Cards tab together, as a scope fence
keeping that landing additive: adding a way to close a card should not quietly
change the number in the bell. Its superseded half was already carved out when
the activity sweep began publishing an open-card count read from the same
files. Its purpose expired with the landing, and its remaining cost is closed
work sitting on the homepage, so the dismissed half goes too.
That freeze was recorded as a known deviation in the protocol document, and the
record is updated in the same commit rather than left to contradict the code.
It is marked resolved rather than deleted, because a reader who met the
deviation once should be able to see it was lifted deliberately.
TESTS THAT ASSERTED THE OLD BEHAVIOUR
derive-cards-tab.test.ts carried a case pinning "a DISMISSED decision still
surfaces on the homepage", the test-level expression of the same fence. It is
inverted here rather than deleted, and the suite now pins that the tab and the
homepage AGREE, which is the property actually worth guarding. Flagged loudly
in the suite comment so a future reader sees an intentional inversion, not a
quietly rewritten assertion.
New cases in derive-needs-you.test.ts, each named for the outcome it protects:
a dismissed decision leaves the homepage queue; an open decision and an open
action stay (positive control, so the fix cannot pass by excluding everything);
a mixed set covering every terminal state of both card kinds keeps only the two
open ones; and the bell count is the closed-aware list length.
Revert-to-red, narrowest revert per line:
restore the hand-written decision keys -> 4 red, every one a dismissed-
decision case, no action case moved.
restore the hand-written action keys -> 0 red, confirming the action branch
is a refactor to the shared helper and not a behaviour change.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
MCP server configs can hold credentials inline, a bearer value under headers.Authorization or OAuth material in a server's `env` block, so they belong on the same denylist as .env files and signing keys. Both spellings are covered, because both occur in real trees: ".mcp.json" at a repository root, "mcp.json" inside an editor's dot-directory. The generic credential-config branch of isSecretBasename tests the basename for a secret-shaped token, and neither spelling contains one, so an explicit name entry is required here, the same as for signing_key.json. Three tests. One pins the deny on both spellings and on mixed case. One asserts through isReviewablePath rather than the predicate alone, so the entry stays wired to the panel gate. One asserts ordinary config JSON stays readable (package.json, tsconfig.json, settings.json, and a basename that merely contains "mcp"), because an over-broad deny would silently make normal project files unreadable, which is the failure this allowlist exists to prevent. Narrow revert confirmed: removing only the two deny entries reddens exactly the two deny tests and leaves the over-deny guard green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Three related bits of housekeeping across the queue derives, the protocol doc and the review panel's denylist.
Queue resolved-state harmonisation
deriveNeedsYouandderiveCardsTabnow shareisDecisionResolved/isActionResolvedinstead of each carrying a hand-written list of terminal-state keys. Previously a dismissed decision left the Cards tab but stayed on the homepage and the sidebar bell.PR #12 had already carried the
supersededhalf of this across, so the surviving divergence was one state on one card kind. Replacing the hand-written key lists with the shared helpers is the part that stops the two surfaces drifting apart a third time.Confirmed by narrow revert: restoring the hand-written decision keys reddens four tests, every one a dismissed-decision case. Restoring the hand-written action keys reddens nothing, so the action side is a refactor to the shared helper rather than a behaviour change.
Protocol doc sync
packages/base/docs/protocol.mdsection 11 recorded the dismissed-decision divergence as a formal known deviation, described as pinned by a test. That is no longer true, so the section is marked resolved rather than deleted, since the freeze was deliberate and a reader who met it should be able to see it was lifted on purpose. The read-then-flip deviations referenced fromtooling-review.mdare untouched.Review denylist additions
mcp.jsonand.mcp.jsonadded toisSecretBasename's exact-deny set, alongside the existingsigning_key.json,.npmrc,.netrcand friends. MCP server configs hold credentials inline, and an exact name entry is needed because the generic config-extension branch tests the basename for a secret-shaped token, which neither spelling has.Three tests: the deny on both spellings and mixed case, an
isReviewablePathassertion so the entry stays wired to the panel gate rather than only to the predicate, and a guard that ordinary config JSON stays readable (package.json,tsconfig.json,settings.json, and a basename that merely contains "mcp").Checks
pnpm -r run typecheckcleanpackages/base44/44,packages/deck2081 passed / 11 skipped, 0 failedcheck:dashesall cleanNote:
test/skeleton.test.tshas a pre-existing flake, a 5s import timeout under parallel load. It reproduces on unmodifiedmainroughly one run in three and passes in isolation. Unrelated to these changes.