docs(case-assignment): guard 4's comment names the triage rule, not the flag - #1615
Merged
os-steve merged 1 commit intoSep 6, 2026
Merged
Conversation
…he flag `case_self_claim`'s guard 4 said it draws "the same line the sharing rule draws with `is_closed == false`". The triage grant has not drawn that line since #1145: `case_unassigned_triage_sharing` is `record.owner_id == null && record.status != "resolved" && record.status != "closed"`. Comment text only — the comment-stripped text of the file is byte-identical before and after. Neither predicate is touched: guard 4 stopping at `closed` alone and the grant excluding `resolved` too are both correct and deliberate, and the comment now states that asymmetry positively instead of asserting sameness, so it cannot rot back to the false claim. It also disambiguates the hazard: two of the three conditions in `src/sharing/case.sharing.ts` legitimately draw with `is_closed == false` — the manager and director grants on critical-priority cases, ruled deliberate under their own headers. The comment names the unowned/triage grant specifically and says those two are neither this rule nor drift. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018xtjdpZFjgWh4Ad9Wcx68J
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
os-steve
marked this pull request as ready for review
September 6, 2026 00:16
This was referenced Sep 6, 2026
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.
Fixes #1593
Comment text only.
case_self_claim's guard 4 insrc/objects/_case-assignment.tssaid it draws "the same line the sharing rule draws withis_closed == false". The triage grant has not drawn that line since #1145 —case_unassigned_triage_sharingreadsrecord.owner_id == null && record.status != "resolved" && record.status != "closed". The guard itself is correct and is untouched. This is #1327's unfinished second half: the same false "these two are the same rule" claim, in the same file, one screenful below where that card's header fix landed.Type of Change
Documentation update (source comment). No behaviour change, no metadata change, no test change.
Proof that no executable line changed
Two independent readings, both against the base commit
9924ee1a.1. The diff, filtered to lines that are not comment text, is empty.
2. The file's comment-stripped text is byte-identical. Stronger than (1), because it also catches a comment edit that reached into a string literal, which a line-shape filter cannot see. Measured with the repo's own
stripComments/authoredTextimported fromscripts/check-source-token-ratchet.mjs, so this is the gate's own basis rather than a hand-rolled stripper:Files changed:
src/objects/_case-assignment.ts(comment block only) and one added changeset. Nothing undertest/is touched — that surface belongs to epic #1579.What the correction had to get right
src/sharing/case.sharing.tsholds three conditions, and two of them legitimately draw withis_closed == false::58record.priority == "critical" && record.is_closed == falsecase_escalation_sharing— manager,edit:88record.priority == "critical" && record.is_closed == falsecase_director_sharing— director,read:186record.owner_id == null && record.status != "resolved" && record.status != "closed"case_unassigned_triage_sharing— the one guard 4 is aboutLines 10 and 70 of that file carry⚠️ headers ruling
:58and:88deliberate (2026-08-31, do not align). So the old comment was not wrong that a sharing rule draws withis_closed == false— it was wrong about which one. The new comment names the unowned/triage grant specifically and states in so many words that the other two are neither this rule nor drift, so a reader arriving with "align them" in mind is stopped at both ends rather than redirected onto the ruled pair.Why it states the asymmetry positively instead of only deleting the false clause
A comment that merely drops an error can rot back to it, because the deletion leaves no reason on the page. The replacement records the reason each line is where it is:
closedalone, because reopening a resolved case is picking the work up, so whoever does it should become its owner;resolvedas well, because a resolved unowned case is history, not backlog, and the tab's row count has to keep meaning "work waiting for a human".It also says why the gap is observable at all — it is live for exactly the callers the sharing rule does not reach (an admin, a manager holding the escalation share), which is why
test/unassigned-case-triage-reach.test.tsdrives the closed guard once per layer, the second time with an actor that can reach the row.Everything still true in the old comment survives verbatim in substance:
statusis read first because it is a string on every driver, andis_closedis accepted astrueor1because SQLite hands booleans back as integers. The file's other fiveis_closedmentions were read and left alone — they explain why the load-balancing counts use$ninover statuses instead of the flag, which is the opposite claim and still true.No issue numbers were added to the comment block, so this adds no new issue archaeology of the kind #1184 is about.
Changeset
An empty-frontmatter changeset, not the
skip-changesetlabel..github/workflows/changeset-check.ymldocuments that form as the sanctioned "this PR releases nothing" declaration, on par with the label, and it counts as an added changeset for the gate. It is preferable to the label here for two reasons: it is added by the PR itself so the gate is satisfied by the diff rather than by a mutable label another workflow could strip, and it leaves the reasoning in the tree. It carries no links, solink-check.ymlwaking on it has nothing to resolve.Gates — what each run establishes, and what none of them establishes
pnpm verify's eight steps were run individually in a fresh worktree, exit code captured before any pipe. All green.validatetypechecktsc --noEmitclean — types unmovedlintobjectstack lintstill at zero warnings, the state #1596 landedlint:i18n-gatehygieneconsole.log, noTODO, copyright header present; the file is 26,121 bytes, 25.5% of the 100KB cap and well under the 70% advisoryhygiene:tokensbuilddist/objectstack.jsonbuilds (2039.4 KB)testRead narrowly:
hygiene:tokensis blind to this change by construction. It strips comments before counting, so its green says nothing about the comment. The file's authored-token reading is unchanged at 1,167, which is the proof of blindness, not a pass on the prose. The ceiling was not touched: it is a ruled 100,000 from Re-anchor the business-semantics ratchet to 100,000 and decouple the README banner from the ceiling — banner pins the measured reading, the ceiling stands alone (maintainer ruling 2026-09-05) #1601, and the gate's own opportunistic re-anchor advisory that fires against it is already documented as expected atscripts/check-source-token-ratchet.mjs:205-211.testgreen establishes that the predicates were not moved —test/live-work-predicate-parity.test.tsstill pins the triage grant's status predicate by name andtest/unassigned-case-triage-reach.test.tsstill drives both layers — not that the prose describing them is accurate.src/sharing/case.sharing.ts:58,:88,:186, and theScope
Base
main, draft. Assignee untouched, no second claim comment posted. One card, one file plus its changeset.Generated by Claude Code