Repository navigation
fix(pm): dispatch-gates derives fifteen whole-root lint gates from the diffs that can move them - #31291
Merged
Conversation
… population nets Each net is the gate's own walk plus its own first filter (or its own per-file reader, imported, where the gate exposes one), bound to a change-kind row, so a diff that can move the gate derives it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5nVPVu6jXRZdmdUb8w
Real diff shapes per net, the gate's own exclusions and filters as misses, the copied spellings held to each gate's source, the two closed roster families measured, and a slow-tier --list parity per net. Two section-count pins now read through their own entries, and the census line moves 744 -> 748. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5nVPVu6jXRZdmdUb8w
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5nVPVu6jXRZdmdUb8w
This was referenced Nov 7, 2026
Contributor
Author
|
domain:devx#3 · os-project-manager · session_01FEkQ5njkh3xbcDN6EtSfw7 席位核对Verdict: ACCEPT · head
Generated by Claude Code |
This was referenced Nov 7, 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.
Requested by Leehom · project thread
Fixes #31257
Clause-②: no
Metadata-protocol: none
维护者速读
dispatch-gates --commands新增 15 条「按门禁自己的扫描范围 + 自己的第一道过滤」判定的派生行。改到某道全仓 lint 门禁真正会读、且能通过它自身预过滤的文件时(例如含getService的插件源码、含.json(的路由文件、新的sql-driver-*.ts分片),就把那道门禁派给卡。另有 2 道(check:stack-collection-maps、check:filter-alias-parity)经实测只读自己源码里写死的文件,路径派生早已覆盖,无需新行。scripts/pm/下的派生工具与自测,不改任何门禁检查什么,不动 workflow;最坏情况是多派生一道几秒的门禁,或漏派生(即现状)。回滚即还原本 PR。scripts/pm/dispatch-gates.mjs的POPULATION_NETS与reachesPopulationNet;scripts/pm/dispatch-gates.data.mjs新增的 15 条CHANGE_KIND_ROWS。node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack packages/services/service-settings/src/settings-service-plugin.ts packages/drivers/driver-sql/src/sql-driver-crud.ts,预期多出pnpm check:init-service-contract、check:settings-bind-window、check:startup-registry-verdict等(main 上没有)。What changes
Eighteen lint steps run on every PR (
lint.yml, nopaths:filter) over a whole-root population, and--commandsnever handed them to a card whose diff sat outside their home package: eleven print in the declared-WIDE block and seven in the artifact-roster block, and the seat ruling on #30763 keeps both blocks out of--commandswholesale. This PR closes them family by family.Fifteen get a change-kind row (option a), each bound to its own population net: the gate's own walk (roots, kept file names, skipped names and directories, read off its source) plus the gate's own first filter, the cheap pre-filter most of them run before their AST pass. Two gates expose their per-file reader and keep no ledger, so the net imports it instead of copying it (
check:runner-env-posture:isProductSource+findRunnerEnvReads;check:error-code-casing:findViolations); both modules are dependency-free, so the tool still runs with no install. A deleted population file is judged on the content it HAD (HEAD's blob, else the blob before the deleting commit), so a move or delete that strands a ledger row or a provider still counts, while a path git never held does not.check:init-service-contract.ts·PREFILTER_TOKENS(getService ×3, providesServices)--list31 files, 0 missedcheck:settings-bind-windowtrigger--list11, 0 missedcheck:startup-registry-verdict--list29, 0 missedcheck:optional-error-sink.ts·CHANNEL_PREFILTER--list204, 0 missedcheck:resume-authority-declareddefineActionDescriptor--list16, 0 missedcheck:route-envelope.ts·-routes.ts/ off-convention / domains by path,.json(by contentcheck:verify-stand-ineslint.config.mjs, verify src by pathcheck:wildcard-fallthrough.ts· a quoted/*--list7, 0 missedcheck:live-db-isolationOS_TEST_{MYSQL,POSTGRES}_URLcheck:runner-env-postureisProductSource· itsfindRunnerEnvReads(imported)check:meta-type-normalizedpackages/rest/srcnon-test, path onlycheck:tenant-chokepointsql-driver-*.tslisted in the driver-sql src dir, path onlycheck:authz-resolverqueriesAllGrantTablesneeds bothcheck:error-code-casing.ts/.tsx· itsfindViolations(imported)check:object-def-param-keys.tsunder a packagesrc· a class or anas any--list244, 0 missedTwo are closed by measurement (option c):
check:stack-collection-mapsandcheck:filter-alias-parityread only files their own source spells as literals (8 and 3), walk no root, and the path derivation already matches the gate for every one of those files. The census's "whole-root walk" signature forfilter-alias-paritywas its ASTwalkgenerator.One is not closed here:
check:published-readme-exports(see Acceptance notes).Why
#31214 paid a CI round trip on
check:error-code-provenance, a family of the same class; PR #31254 fixed three and #31257 holds the rest. A dev report could read "all derived gates green" while CI went red on any of these.Tests
New cases in
scripts/pm/dispatch-gates.self-test.mjs, table-driven over the fifteen nets (NET_CASES, one entry per net, held toPOPULATION_NETSkey for key):trigger, ahasServiceprobe, an optional-errorsink type, a pausing descriptor, ac.json(writer, a stand-in call in a verify test, a wildcard mount, a live suite's URL read, a runner-variable branch, a new REST source, the nextsql-driver-*split, both grant tables, a lowercase code, a class extending the SQL driver); the gate's own walk exclusion is a miss; a population file without the filter is a miss; a deleted file is judged on its prior content (hit and miss); a path git never held is a miss; a path outside the roots is a miss; the copied spellings are still in the gate's source (and for startup/sink the token SET equals the gate's own Map/Set); exactly one row names the gate, bound to this net; a live specimen derives the gate through the whole table; the rendered lead says it needs no build and why no card had it.--listnames is inside its net (7 gates, 0 missed).check:i18n, because the optional-sink and object-def nets fire on the same live files for their own reason.Ablation (one fast-tier run, three mutations through nested
scripts/ablation-replace.mjs, restore proven twice: blob == HEADc0eee2c17012,git diff HEADempty), 47 of 2174 cases red, every one named:inNetPopulation⇒ red "…the gate's walk excludes X, so the net does too" for the 11 nets that exclude by file name.trueinreachesPopulationNet⇒ red "a population file without the gate's filter is not a hit" for the 9 token nets (the pattern and imported-reader nets are unaffected by that line, as designed).Acceptance notes
check:published-readme-exports: not derived; for a follow-up card. Its population is the 129 published markdown docs of public packages outsideui/, plus the BUILT type entries of the 77 targets (68 packages) their 268 import statements reach. A path net over those packages is close to every package's source, so a precise net needs a member-name reader (the names each doc imports, matched against declarations in the reached package). The gate also needs those packages built (exit 3 on an unbuilt worktree). Left out rather than shipped imprecise.optional-error-sink(24% of its population) andobject-def-param-keys(30%) are as wide as the gates' own first filters; both are about 5–7 s and unconditional in CI..github/**edit; no change to what any gate checks.Verification
Gate union from
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackon this diff: 30 families, run on head81c8a785(after mergingorigin/main), reconciled with--ran: "30 derived famil(ies) accounted for — 30 run, 0 NOT-MEASURED (a DERIVED zero — all 30 recorded an exit code and none of them is 3)".30 gates, exit codes captured before any pipe
node scripts/check-closing-keyword-parity.mjs(and--self-test),check-comment-mask-corpus.mjs,check-declaration-mirrors.mjs(and--self-test),check-self-test-wired.mjs(and--self-test),check-self-test-workflow-commands.mjs(and--self-test),check-whole-set-label-write.mjs(and--self-test),ci/plan-test-core-shards.mjs --self-test: exit 0 eachpnpm check:agent-test-spelling,check:bash32-floor,check:ci-filter-parity,check:cli-command-ids,check:cross-package-test-inputs,check:declared-population-live,check:driver-memory-census,check:entry-guard,check:gitlink-declared,check:nul-bytes,check:parse-guard,check:pnpm-filter-targets,check:pnpm-flag-spellings,check:ratchet-remedy-authority,check:refd-timer-probe,check:scripts-symbol-anchors,check:watch-hint-literal: exit 0 eachpnpm check:pm-dispatch-gates: exit 0, "✓ dispatch-gates self-test (fast tier): 2174 cases pass; 8 slow section(s) deferred." (464.8 s)node scripts/pm/dispatch-gates.mjs --self-test): on head81c8a785, "✓ dispatch-gates self-test: 2483 cases pass." (fast 2174 cases in 422.9 s, slow 309 cases in 1282.6 s).npx eslint --no-inline-configon the three files: exit 0.node scripts/check-nul-bytes.mjs: exit 0. No package touched, so no packagelint/test/typecheckis owed.skip-changeset:scripts/pm/**ships in no package.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses (eslint on the three files, exit 0).main, one pull request.scripts/pm/**), soskip-changeset; both declaration lines are filled in.packages/specnot touched.Generated by Claude Code