Skip to content

metadata-protocol: type the six query-options erasures in protocol.ts data reads (findData, getData, cloneData, probeRecord) so their bodies can leave the class #29764

Closed

Description

@objectstack-fleet

domain:server#4 · os-warren · session_01JQwxbacSXJQqAztgt4UMrS

Filing gate: ① an out-of-scope finding of the #25467 E2 section-3 dev, recorded in the seat ruling 6594932448 on #25467. Filed by domain:server seat 4. ⛔ Not a claim. Suggested-grade: p3 (a refactor prerequisite; no user-visible behaviour).

What happens

scripts/query-options-erasure-baseline.json grandfathers six untyped query-options sites in packages/metadata-protocol/src/protocol.ts (line 37 on origin/main): findData ×3, getData, cloneData and probeRecord. The baseline only shrinks and is keyed by file, so moving any of those bodies into a module is refused as an addition, and a move is not an exception (check-query-options-erasure-ratchet.mjs). That is why cut 4 kept probeRecord on the class, and why #25467's E2 section 3 moves only validateData, createData, updateData and deleteData (ruling 6594932448).

Wanted

  1. Type each of the six sites, so the erasure goes away rather than moving.
  2. protocol.ts leaves the baseline: its key reaches 0 and is removed, as the ratchet asks of a fixed file.
  3. No behaviour change; the data-read pins pass unchanged.
  4. After it lands, [maintainer] refactor(metadata-protocol): split src/protocol.ts (33,065 lines, +10,169 in 30 days) along its ObjectStackProtocolImplementation seams, one move-only slice per PR #25467 moves the four remaining data-CRUD bodies (findData, getData, cloneData, probeRecord) as one more E2 cut.

Serial: after #25467's section-3 PR (same file, under the declared protocol.ts freeze, 6594835694 on #27737).

Dedupe: searched query-options-erasure protocol.ts, erasure baseline findData; nearest is #25467. New.

Links back: #25467 (ruling E 6537939895, seat ruling 6594932448), scripts/query-options-erasure-baseline.json.

Activity

  1. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: first-touch audit · p3 · domain:server kept · pm:triage → pm:queue · 2026-11-03T04:00Z

    ⛔ Not a claim.


    Generated by Claude Code

  2. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#4 · os-warren · session_01JQwxbacSXJQqAztgt4UMrS

    Claim: PM loop · 2026-11-03T05:38Z
    Session: session_01JQwxbacSXJQqAztgt4UMrS (seat); dev = card thread session_01JQwxbYv9aJAo6MEAcF1dRK
    Account: os-warren
    Branch: claude/project-thread-bzwi04 (a project card thread pushes only its assigned branch; measured platform exception to claude/issue-<n>-<slug>)
    Worktree: objectstack-issue-29764
    Domain: domain:server
    Seat: domain:server#4
    File surface: the six grandfathered query-options sites in packages/metadata-protocol/src/protocol.ts (findData ×3, getData, cloneData, probeRecord), scripts/query-options-erasure-baseline.json, eslint.config.mjs only if it lists protocol.ts for this rule, tests if a type change needs a pin (stop on breach; explain in the report). ⛔ No packages/spec/**; no body moves.
    Container & model: M, mode:thread (the os-dev agent type is not loaded in seat sessions), model: TIER_DEFAULT, effort: project default (the maintainer sets effort)
    Clause-②: no (internal typing; no published surface changes)
    Metadata-protocol: none
    Responsibility: n/a — refactor prerequisite for #25467
    Thread-read: 6595103719
    Premise: the erasure baseline grandfathers protocol.ts with six sites, all in the data reads that #25467's next cut moves (seat ruling 6594932448)
    Serial constraints cleared: #25467 section 3 merged (PR #29788, 339f63da) and the protocol.ts freeze is lifted. Seat 2's #29673 touches other members of the file.

  3. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#4 · os-warren · session_01JQwxbYv9aJAo6MEAcF1dRK
    os-dev-report

    {
      "issue": 29764,
      "status": "done",
      "branch": "claude/project-thread-bzwi04",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/29834",
      "session": "session_01JQwxbYv9aJAo6MEAcF1dRK",
      "premise_still_valid": true,
      "summary": "Measured the six grandfathered sites on main eb05ea2f (protocol.ts lines 6124 aggregate, 6220 find, 6296 count in findData; 6371 getData findOne; 6455 cloneData findOne; 6612 probeRecord findOne) and typed each with the type IDataEngine declares (EngineAggregateOptions, EngineQueryOptions, EngineCountOptions). aggregate and count bind their literal to a typed const; cloneData and probeRecord drop the assertions; findData and getData keep their working bags and hand the engine a typed bag built key by key, copying only present keys, so the engine sees the same keys (the only key no longer carried is a null groupBy or aggregations on a plain list query, which the engine already reads as absent). protocol.ts left scripts/query-options-erasure-baseline.json (count 0); eslint.config.mjs needed no edit because the rule's ignores are read from the baseline keys. No body moved; no packages/spec edit; patch changeset added.",
      "tests": "Head e16c71d2. Package typecheck and test through os-verify-lock: VERDICT command-exit 0; Test Files 310 passed, 4 skipped (314); Tests 22305 passed, 26 skipped (22331). No pin edited or added. Reverse check: one wrong key planted in each of the six bags made the package typecheck exit 2 with six TS2353 errors, one per site; restored from HEAD, git diff HEAD empty. Published index.d.ts byte-identical to main's build (sha256 3a15d153...f48075, ESM equal to CJS). No ablation: no tested behaviour changed.",
      "gates": "Local, head e16c71d2: closure build exit 0; metadata-protocol typecheck exit 0; check:query-options-erasure exit 0 (38 sites in 14 files, none new, key set verified against b0ef25f, no files added); pnpm lint exit 0; eslint packages/metadata-protocol --no-inline-config exit 0. dispatch-gates --commands derived 63; --ran: 63 derived, 61 run, 2 NOT-MEASURED, 0 UNRUN, every run family exit 0. NOT MEASURED (exit 3, prerequisite): check:dual-build-cjs-loads (needs every package built), check-plugin-teardown-shape.mjs --self-test (needs an unshallowed clone); both are CI's reading. PR check-runs: in_progress at report time.",
      "dogfood_battery": "n/a, no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2: fleet-write relay pr_create (PR 29834, read-back 7891 bytes sent, 7891 stored, identical); post-stamped os-dev-report comment on 29764. git push is not a REST write.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed: getData's working bag and findData's raw request bag still hold any values; typing getData's working bag needs projectionFieldsValue and storedMetadataBodyProjection to answer string[] for string[] input, type-only signature changes outside this card's surface (PR Acceptance notes).",
        "carrier: none · noted, not filed: the ratchet reports plugin-approvals/src/approval-service.ts falling 10 to 4 on main with its ceiling unrecorded."
      ]
    }
  4. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#4 · os-warren · session_01JQwxbacSXJQqAztgt4UMrS

    Landing record · #29764 · PR #29834 · 2026-11-03T07:34Z

    Reading Probe Result
    Queue membership git ls-remote origin 'refs/heads/gh-readonly-queue/main/pr-29834-*' 0 refs (released)
    Ancestry git merge-base --is-ancestor 1dc60299 origin/main yes
    Content git grep -c "findQuery: EngineQueryOptions" origin/main -- packages/metadata-protocol/src/protocol.ts 1
    Baseline git grep -c '"packages/metadata-protocol/src/protocol.ts"' origin/main -- scripts/query-options-erasure-baseline.json 0 (key gone)

    Release: claim 6596359196 (session_01JQwxbacSXJQqAztgt4UMrS, card thread session_01JQwxbYv9aJAo6MEAcF1dRK, branch claude/project-thread-bzwi04) · full landing
    Produce: PR #29834 merged as 1dc60299 at 2026-11-03T07:33Z. Six query-option erasures in protocol.ts are now typed with the engine's declared types, with no casts: findData's find, count and aggregate, getData, cloneData and probeRecord. protocol.ts has left the erasure baseline. No behaviour change: the engine receives the same keys. Seat ACCEPT 6597661937 (TIER_DEFAULT; Clause-②: no, so no contract review was owed). Fixes #29764 closed this card as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:serverDomain lane — seat card indexed by label:pm:seatpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions