Skip to content

37609 跟进:lint 上下文规则的四处小修(文档链接、两持有者断言、无包提示语、过期注释)与 ADR-0150 测试路径 #37745

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

Filing gate: ② follow-up out of #37609. The source is seat 5's contract record 7206942612 on PR #37723: nits N1–N4, accepted as deviations in ACCEPT 7206948596, which sends them to one follow-up card together with the ADR-0150 pin-path residue. The owning area files it under the source card, per the maintainer's standing permission for areas to file their own follow-up cards.
Grading: area:ai · Task · p3 · reach: packages/lint/src/validate-ai-tool-references.ts and its test, one comment in packages/metadata-core/src/package-closure.ts, one ADR-0150 pin line · evidence: read.

维护者速读

  • 做什么:37141 跟进:技能 context 指向依赖包资料包时误报,stdio MCP 未按工具绑定过滤技能 #37609 的规则搬到 metadata-core 后留下四处小问题:一处文档链接写错函数名、一个测试断言太弱、一句提示语在没有包时措辞不对、一处注释还说规则在 core;另外 ADR-0150 有一行测试路径要跟着搬家更新。
  • 谁受益:读 lint 提示的作者和维护这条规则的人。
  • 不做会怎样:提示语偶尔说"本包范围内"但其实没有包;一个测试在规则坏掉时仍可能通过;注释和 ADR 指向旧位置。
  • 需要你做的:无。

What

  1. N1 packages/lint/src/validate-ai-tool-references.ts (docblock near line 351): {@link skillContextResolution} names no symbol; the function is skillContextResolver.
  2. N2 packages/lint/src/validate-ai-tool-references.test.ts, "two packages in the closure shipping the pack": the pin asserts only the rule id and both holder ids, so an empty closure (outside-closure) passes it too. Assert the "more than one holder in reach" wording so it pins the ambiguous-in-closure arm itself.
  3. N3 contextRefusalFinding: for a stack with no manifest.id and two package holders (ambiguous-in-environment), the hint says "in reach of this package", but there is no package. Word that arm without a package.
  4. N4 packages/metadata-core/src/package-closure.ts:16: the comment still places resolvePackageScopedHolders in @objectstack/core; it now sits beside that file in metadata-core.
  5. ADR-0150 pin-path residue (governed docs/adr/**): the core + runtime: a residual-twin job refusal (ambiguous-in-environment) can carry one candidate; no PackageScopedHolder kind names a top-level job outside every package (ADR-0150 D3) #32412 amendment note's Pins line names packages/core/src/package-scoped-resolution.test.ts, which PR fix(lint,metadata-core): a skill's context naming a pack a declared dependency ships no longer warns; the ADR-0150 D3 rule moves to metadata-core #37723 moved to packages/metadata-core/src/package-scoped-resolution.test.ts. Update that one path; re-read the other packages/core/src/package-scoped-resolution.ts#… anchors (they still resolve through core's re-export) and decide whether to point them at metadata-core in the same edit.

Acceptance

  • The {@link} resolves (typedoc or tsc with the doc check, if the package runs one).
  • The two-holders pin reds when the closure is emptied (show the ablation in the PR body).
  • The no-package ambiguous hint names no package, pinned by a test.
  • The package-closure.ts comment and the ADR-0150 pin line name the metadata-core path; the ADR anchor gate stays green.
  • Clause-②: no, Metadata-protocol: none. Items 1–4 are text and test only; item 3 changes a lint hint string only.

Blocked-by: #37609 (PR #37723)
Parent: #37609
Size: XS
Dedupe (objectstack, is:issue is:open): "skillContextResolution" 0 · "package-closure.ts" → only #37609 (source). No duplicate.

Activity

  1. added
    pm:queue
    area:ai
    domain:server
    on Nov 27, 2026
  2. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:ai · domain:server · Task · priority:p3 · pm:blocked · size XS; rationale: four small fixes to the lint context rule and one ADR-0150 pin path. p3. Its named blocker #37609 is open, so it moves from pm:queue to pm:blocked.

  3. added
    pm:blocked
    and removed
    pm:queue
    on Nov 27, 2026
  4. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie

    Claim: PM loop round 1 · area o1-B (epic #36996 follow-ups; card from seat 5 knock 7207018454 on mailbox #37561) · 2026-11-27T03:03Z
    Session: session_016WV4cxBECSPtHxQMZDHSie
    Account: os-elon-musk
    Branch: claude/area-o1B-37745
    Worktree: objectstack-issue-37745
    Domain: domain:server
    Area: o1-B
    Seat: repo:objectstack#1
    File surface: packages/lint/src/validate-ai-tool-references.ts (N1 docblock, N3 hint arm) and its test (N2, N3 pins); packages/metadata-core/src/package-closure.ts (N4 comment); docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md (the #32412 amendment note's Pins line, and the packages/core/src/package-scoped-resolution.ts#… anchors only if re-pointing them keeps the anchor gate green); a changeset for @objectstack/lint (stop on breach; explain in the report)
    Container & model: XS, mode:subagent, model: claude-fable-5-2 (dispatch-gates --tier docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md packages/lint/src/validate-ai-tool-references.ts: "Model tier — MANDATORY: claude-fable-5-2 (derived from the file surface, not recalled)"), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card (Task)
    Thread-read: 7207161910
    Premise: holds as filed, read not measured — source PR #37723 merged (14b930039a); the dev re-reads each item's line on main before editing.
    Serial constraints cleared: none: source PR #37723 merged; no open o1-B PR touches these files (overlap-check runs before each push)
    Pre-claim lane: packages/lint, packages/metadata-core ⇒ domain:server (file ownership only); docs/adr/** governed ⇒ Tier H for the whole PR: built and L1-read in o1-B / L1-a with the contract review, landed by seat repo:objectstack#1 after ①–④.
    Pre-claim deps: #37609 / PR #37723 merged ⇒ pm:blocked → pm:dispatched.
    Prior rulings read: check-prior-rulings.mjs --card 37745 --paths the three files: 75 hit lines (69 in ADR-0150, 4 in validate-ai-tool-references.ts, 2 in package-closure.ts); the dev reads each hit line in the files it edits and keeps every ruled sentence.
    Fold-or-serial: not folded with #37744 (different mechanism and files).

  5. added
    pm:dispatched
    and removed
    pm:blocked
    on Nov 27, 2026
  6. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie
    os-dev-report

    {
      "issue": 37745,
      "status": "done",
      "branch": "claude/area-o1B-37745",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37795",
      "pr_number": 37795,
      "head_sha": "8b3de84ee4b2290844df37a8b2d22582b1c2170d",
      "session": "session_016WV4cxBECSPtHxQMZDHSie",
      "premise_still_valid": true,
      "summary": "All five items done on origin/main 149085573d (each premise re-read and held). N1: the docblock link names skillContextResolver. N2: the two-holders pin asserts the ambiguous-in-closure arm itself. N3: the ambiguous-in-environment hint reads \"Keep one pack of that name across the artifact's packages, or name another pack\", pinned with a control; every other message and hint is byte-identical. N4 and ADR-0150: the comment, the Pins line and the four core symbol anchors name the metadata-core path. Item 5 choice: re-pointed all four anchors (PACKAGE_SCOPED_TYPES twice, PackageScopedHolder, PackageScopedNameRefusedError), because each symbol is declared in the metadata-core file and core's file only re-exports it; both anchor gates stay green. Draft PR left draft (Tier H); card assignee not written.",
      "tests": "head 8b3de84e, tree clean. `pnpm --filter '@objectstack/lint^...' build`: VERDICT command-exit 0. `pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 src/validate-ai-tool-references.test.ts`: Test Files 1 passed (1), Tests 45 passed (45), VERDICT command-exit 0. `pnpm --filter @objectstack/lint typecheck`: VERDICT command-exit 0 (check:test-typecheck OK). ABLATION (scripts/ablation-replace.mjs; closureOf in skillContextResolver returns an empty set; anchor 1 -> 0, blob 0685581e9efc -> 5095e7cd6725; restored blob == HEAD and git diff HEAD empty after each leg; the test imports the rule from src, so no build leg): this PR's test file: Tests 3 failed | 42 passed (45), the two-holders pin red on `to contain 'more than one holder in reach'`; the test file as on main under the same mutation: Tests 1 failed | 42 passed (43), the two-holders pin green. Direction observed: turns red, as expected.",
      "gates": "LOCAL (head 8b3de84e): `node scripts/pm/dispatch-gates.mjs --commands` derived 68; `--ran` verdict: \"68 derived famil(ies) accounted for — 67 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)\". 67 exit 0, among them `pnpm check:adr-anchors` (\"check-adr-anchors: OK (132 anchored file(s) ...\"), `pnpm check:adr-symbol-anchors` (\"4404 anchors across 164 records resolve\"), `pnpm check:nul-bytes` (OK), `pnpm check:type-check-debt` (\"OK — 0 ledger entr(ies) re-measured ... none above its recorded number\"). Four first exited 3 for an unbuilt dist and exited 0 after the build: check:doc-formula-expressions, check:docs-transcript-drift, check:dual-build-cjs-loads, check:lean-entry-closure. NOT MEASURED: check-plugin-teardown-shape --self-test, reason: exit 3, its positive control is pinned to a commit the shallow clone cannot reach. overlap-check before each push: VERDICT clean exit 0. CI on PR 37795 at report time: every check-run in_progress (Check Changeset, Governed Surface Queue Guard, the Lint and Type Check lanes, PR-body guards); none concluded.",
      "line_budget": "+57 / -8 = 65 changed lines over 5 files (threshold 3000: under)",
      "files_changed": [
        ".changeset/37745-lint-context-hint-no-package.md",
        "docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md",
        "packages/lint/src/validate-ai-tool-references.test.ts",
        "packages/lint/src/validate-ai-tool-references.ts",
        "packages/metadata-core/src/package-closure.ts"
      ],
      "deviations": [
        "The checkout is shallow: the source merge commit named in the dispatch is not reachable, so the premise was verified from the files on origin/main, not from history.",
        "Acceptance 1: @objectstack/lint runs no typedoc or doc-link check; the link is verified by the same-module declaration and a green tsc, not by a resolver.",
        "The derived gate check:type-check-debt built every package under the shared verify lock from this run (held 8m46s, one sibling queued behind it).",
        "test:repo not run locally (CI owns it). metadata-core tests not run: its only edit is a comment.",
        "The lint closure build was passed --concurrency=2 on a pnpm filter run; it built and exited 0.",
        "PR body opens with the harness attribution comment the dispatch order requires; commits carry the model-free trailer pair of AGENTS.md, not the harness reminder's model-named one.",
        "ADR-0150 edit covers five lines, not one: the Pins line plus the four symbol anchors, inside the claim's file surface."
      ],
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 relay strokes — pr_create (POST pulls, draft; POST issues/37795/assignees) and this report comment (POST issues/37745/comments); plus 2 git pushes (the empty branch, then 8b3de84e)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed · docs/qa/platform-checklist/areas/platform-core.json still cites packages/core/src/package-scoped-resolution paths; the symbol path resolves through core's re-export; in the PR's Acceptance notes"
      ]
    }
  7. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cxBECSPtHxQMZDHSie

    Close-out (area o1-B) · 2026-11-27T05:19Z
    Delivered: PR #37795 merged: the ambiguous-in-environment hint of ai-skill-context-unknown no longer names a package the stack does not have; the docblock link names the declared skillContextResolver; the two-holder pin asserts the wording the card names; the package-closure.ts comment names where the resolver lives; ADR-0150's five pin paths point at packages/metadata-core/src/package-scoped-resolution.*. L1 ACCEPT 7209767197; contract review PASS 7209744495; landed by seat 1 after approval.
    State: pm:dispatched removed with the close. Remaining: none on this card (the platform-checklist JSON anchors resolve through core's re-export; seat 1 records no defect).

  8. removed
    pm:dispatched
    on Nov 27, 2026
  9. added a commit that references this issue on Dec 1, 2026
    4b8aca2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aidomain:serverpriority:p3

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions