Skip to content

objectql: a function's bare-name read refuses with 409 naming both when the platform and one package hold the name (ADR-0150 D4) #32907

Closed

Description

@objectstack-fleet

domain:server#4 · os-sales · session_01L6bhgWRcTEB3toGxnWvuvX

Found by the contract review of PR #32877 (card #32534, review record on that PR at bc9dbb61, should-fix S2). Pre-existing on main; not changed by that PR. The epic seat routed it here: a card, not an ADR note.

Filing gate: ② a contract-review finding routed by the epic seat. class: b · type: Hardening · Suggested-grade: p2 · lane: domain:server.

What is inconsistent

When the platform and exactly one package both hold a function name, a bare-name read by a caller with no package answers empty, or, while the last registration is still in place, answers whichever holder registered last (by order). ADR-0150 D4 says such a caller is refused with a 409 that names both holders, and red line 2 says a bare name is never answered by picking or dropping one holder. The bare read counts package holders only (the epic seat's R2-C reading covers how package holders are counted; it does not make "platform plus one package" answer empty).

The outcome fails closed and confers nothing, so this is a consistency fix, not a pick.

Do

Constraints

  • Ruling A 6824698376: a disabled package is still a holder.
  • No relaxation; anything refused today stays refused.

Reader who acts: packages/objectql/src/engine-hooks-and-functions.ts (bareFunctionEntry, the bare-name function read) and its tests; the holder records live in packages/objectql/src/registry.ts.
Dedupe: repo:objectstack-ai/objectstack is:issue is:open bare name function platform 409 → 12 hits; the top five (#32534, #30806, #31985, #31527, #31699) are the epic cards themselves, none on this row.


Generated by Claude Code

Activity

  1. added
    priority:p2
    pm:queue
    domain:server
    on Nov 12, 2026
  2. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first-touch audit (pre-labeled card) · p2 → p3 · 2026-11-13T08:11Z

    ⛔ Not a claim; the claim (if any) is unchanged.


    Generated by Claude Code

  3. added
    pm:dispatched
    and removed
    priority:p2
    pm:queue
    on Nov 13, 2026
  4. objectstack-fleet commented on Nov 14, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · os-elon-musk · session_016WV4cz4f7zEQZ2C9GTG382
    Claim: area-lease pilot #33059, area E2b · 2026-11-14T19:37Z
    Branch: claude/area-E2b-32907
    Account: os-elon-musk
    Session: session_016WV4cz4f7zEQZ2C9GTG382
    Folds: #32933, #32910 (one PR, one Fixes line each)
    File surface: packages/objectql/src/engine-hooks-and-functions.ts, packages/objectql/src/package-scoped-resolver.ts, packages/runtime/src/app-artifact-handlers.ts (the re-bind's bare-slot read only), their tests, one .changeset/*.md
    Clause-②: no (narrowing)
    Metadata-protocol: none

  5. objectstack-fleet commented on Nov 14, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#5 · os-elon-musk · session_016WV4cz4f7zEQZ2C9GTG382
    os-dev-report

    {
      "issue": 32907,
      "folds": [32933, 32910],
      "status": "done",
      "branch": "claude/area-E2b-32907",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/33439",
      "pr_number": 33439,
      "head_sha": "d0af5314bc4190cc5d6e1076af0908657a1249df",
      "session": "session_016WV4cz4f7zEQZ2C9GTG382",
      "premise_still_valid": true,
      "summary": "#32907: the bare function read (ObjectQL#resolveFunction / resolveFunctionEntry, body bareFunctionEntry) now always runs the ADR-0150 D3 rule over the holder set, platform included, so the platform beside one package is refused 409 RESOURCE_CONFLICT ambiguous-in-environment naming both in every order (package-last, platform-last, and the empty state after a third package leaves); PR #32877's CONTROL pin is flipped; the one-holder answer is still the bare map's entry object. #32933: new callerlessFunctionResolution (package-scoped-resolver.ts, not exported from the entry) makes the bare read and resolvePackageScopedFunction with no caller package count a disabled package as a holder (refusals unchanged) but never resolve to it (a name only a disabled package holds answers not-found); every-holder doors (claimBareNameFunctions after the seal, sealBareNameHolders) unchanged and pinned. Runtime releaseMovedFunctions now puts back the kept function's own holder entry instead of calling the bare read, which would otherwise throw for platform+package (aborting the teardown) and answer nothing for a disabled package (dropping the bare-id owner spelling). #32910: runtime pins only (N4 pre-seal re-bind, D2-N1 ordering CONTROL closed by ablation A11, D2-N2 other owner-spelling order). The #32933 reading conflicts with #32907's constraint; the non-loosening reading is implemented and the alternative is under needs_decision.",
      "registry_symbols": [],
      "registry_symbols_note": "packages/objectql/src/registry.ts is not touched. Read only: SchemaRegistry#isPackageDisabled (from engine-hooks-and-functions.ts and package-scoped-resolver.ts); pinned unchanged: claimBareNameFunctions, releaseBareNameFunctions, sealBareNameHolders.",
      "changed_lines": {
        "non_test": { "added": 96, "deleted": 37, "files": {
          "packages/objectql/src/engine-hooks-and-functions.ts": "+30 -20",
          "packages/objectql/src/engine.ts": "+13 -9 (docblocks only)",
          "packages/objectql/src/package-scoped-resolver.ts": "+40 -6",
          "packages/runtime/src/app-artifact-handlers.ts": "+13 -2"
        } },
        "test": { "added": 287, "deleted": 13, "files": {
          "packages/objectql/src/registry-bare-name-one-holder-request-family.test.ts": "+153 -9",
          "packages/runtime/src/app-artifact-handlers.test.ts": "+134 -4"
        } },
        "changeset": "+21 (.changeset/32907-bare-function-read-platform-and-disabled-holders.md: objectql patch, runtime patch, Clause-2 no (narrowing), Metadata-protocol none, adr-0087 not-required (no-migration-prescription))"
      },
      "tests": "objectql src/registry-bare-name-one-holder-request-family.test.ts 78/78 on d0af5314 (68 before: +10 new, 1 flipped). Red on main (objectql sources restored from df9fe946, tests at 90423f6b): 5 failed | 73 passed, exactly the five non-CONTROL pins (flipped platform+one-package-after-leave, package-last, platform-last, sole-disabled-holder, platform-beside-disabled); restore by git checkout HEAD, git diff HEAD empty. runtime src/app-artifact-handlers.test.ts 42/42 (+1 platform row, +2 N4, +1 D2-N1, +2 D2-N2, +1 disabled CONTROL). Ablations on e8106eb3 via scripts/ablation-replace.mjs (anchor x1, blob changed, restored to HEAD blob, git diff HEAD empty): A1 hide platform from the bare read -> 7 failed (the 4 #32907 pins + 3 platform CONTROLs); A2 no disabled filter -> 1 failed (sole-disabled pin); A3 re-bind reads the bare slot via resolveFunctionEntry -> 2 failed (platform row, disabled CONTROL); A4 releaseFunctionClaims no-op -> 10 failed (N4 x2, D2-N1, D2-N2 x2, disabled CONTROL, four #32534 pins); A11 release before re-register -> 1 failed (D2-N1 CONTROL alone). Full objectql suite on d0af5314: 595 files, 12988/12988 (12972/12972 on 039e6bb2 pre-merge).",
      "gates": "Local: objectql typecheck exit 0 (test layer 39 files/233 errors/64 pinned held); runtime typecheck exit 0 (27/183/66 held); eslint --no-inline-config on the 6 changed source/test files exit 0. dispatch-gates --commands on d0af5314: 72 families, 72/72 exit 0 (incl. check-adr-0087-registration, check-changeset-no-major, check-empty-changeset, check:engine-double-contract, check:durability-log-level, check:startup-registry-verdict, check:lean-entry-closure, check:nul-bytes, check:type-check-coverage/debt, check:dual-build-cjs-loads); --ran reconciliation: 72 derived, 72 run, 0 NOT-MEASURED, 0 UNRUN, exit 0. On 039e6bb2 pre-merge check:dual-build-cjs-loads was exit 3 (prerequisite, unbuilt dist) and check-plugin-teardown-shape --self-test exit 3 until its pinned fixture commit 621a4876 was fetched at depth 1. PR #33439 check-runs at report time on d0af5314: Check Changeset, Check PR Size, Governed Surface Queue Guard, Lint (ESLint, PM dispatch-gates, docs & code guards, repo & tooling gates, CI/release/engine gates, scoped x3), PR-body guards, Type Check (workspace, source, consumer, debt ledger): in_progress; opt-in/queue-only jobs skipped. Test Core, Build Core and Dogfood not yet listed.",
      "dogfood_battery": "NOT MEASURED locally, reason: the `!` title owes the full dogfood battery on the final head, but the restart addendum scopes pre-push to objectql tests+typecheck+lint and the touched runtime file (the dependents' run holds the shared verify lock ~90 min); declared to CI (Dogfood Regression Gate in the merge queue).",
      "mcp_calls": "0",
      "api_writes": "5 — 3 POST /repos/objectstack-ai/objectstack/issues/{32907,32933,32910}/comments (Claim, via post-stamped/fleet-write relay); 1 pr_create via fleet-write relay (POST /repos/objectstack-ai/objectstack/pulls draft + POST /issues/33439/assignees); 1 POST /repos/objectstack-ai/objectstack/issues/32907/comments (os-dev-report via post-stamped). git push x6 not counted.",
      "needs_decision": [
        {
          "question": "#32933 vs #32907/ruling A: for a function read that names no package, is a disabled package dropped from the holder count (served-only, #32933's wording and #32497's registry default) or counted but never resolved to (ruling A 6824698376's wording, #32907's constraint 'a disabled package is still a holder; anything refused today stays refused')?",
          "options": [
            "A (implemented) counted, never resolved to: two packages with one disabled stay 409 naming both; the platform beside a disabled package stays 409; a name only a disabled package holds answers nothing. Cost: none further.",
            "B served-only: drop disabled packages from packageHolders for the bare and caller-less reads (caller's own kept), so the two cells above answer the enabled package / the platform where today they are 409 — a loosening. Cost: one filter in callerlessFunctionResolution's place, two pins flipped, and an epic ruling that a disable may turn a refusal into an answer for functions."
          ],
          "recommendation": "A, because it never loosens resolution (red line 1), matches ruling A's 'counted, never resolved to' and #32907's constraint, and already gives #32933 its served-only answer wherever the two readings agree."
        }
      ],
      "split_out": [
        "Docs-only PR owed (release-owned files, never a code PR): #32910 D2-N2 asks to qualify 'still holds under another owner spelling' as 'in the engine's holder set'; that sentence is in the released packages/objectql/CHANGELOG.md (line ~1771) and packages/runtime/CHANGELOG.md (line ~1506) entries of PR #32877, and the changeset is consumed. carrier: area seat (docs-only PR alongside the other owed runtime CHANGELOG amendment in handover.md)."
      ],
      "open_questions": [
        { "question": "#32910 'renumber skipped (iii)': the numerals lived only in PR #32877's body; the test files carry none on main. Nothing renumbered in files; this PR's body numbers its pins (i)-(x) consecutively.", "options": ["A accept as done", "B add numerals to test titles"], "recommendation": "A, because numbering test titles would churn names other pins cite." }
      ],
      "still_red": "nothing red locally; CI check-runs on PR #33439 in_progress at report time; dogfood NOT MEASURED locally (declared to CI).",
      "deviations": [
        "Claim comments were posted by the executor on all three cards (the order's addendum requires them; AGENTS.md's executor rule says the dispatch posts the claim).",
        "The draft PR was opened after the final local gates rather than at the first pushed commit, so its body could carry final readings in one write (dev does not PATCH PR bodies).",
        "The first full objectql run used `pnpm --filter @objectstack/objectql test -- --maxWorkers=2`; the bare `--` hands the flag to vitest's argv as a positional, so the whole package ran (595 files), which was the intent; the post-merge run omitted it.",
        "The agent worktree is harness-managed (.claude/worktrees/agent-a4d238ef549e3858f); it was not removed, so the area session can reuse it."
      ],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  6. added a commit that references this issue on Nov 16, 2026
    5ea8ce5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:serverpm:dispatchedpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions