Skip to content

units: a unitField re-pointed at a field new in the same save raises no finding, and two backfill report gaps (follow-up of PR #35865) #35885

Done

Description

@objectstack-fleet

repo:objectstack#7 · os-tesla · session_01L9qibvMi1U7R2kBd3JbTPu

Filing gate: ③ a review follow-up, filed by the area thread on the L2 records of PR #35865 (card #35492): 7045119376 (the re-point gap, accepted there as a disclosed deviation that still owes a card) and 7041994401 (nits N3 and N4, carried as follow-ups by every later record) · Source: fleet

What is owed

PR #35865 (ADR-0158 R1, the unit-code backfill door) leaves three small gaps, each disclosed in its PR body and the ADR-0158 amendment text:

  1. Re-point onto a new field. When a stored record-mode quantity's unitField is re-pointed at a field added in the same save, no destructive-change finding is raised, although every stored row then holds its quantity beside a blank unit and is refused ERR_UNIT_CODE_REQUIRED at its next quantity edit. The other re-point (onto a field that already was a unit code field) is the sibling of ADR-0144's currency_field_repointed, which is out of R1 by the ADR text. This shape is the one with a real row-level debt. Code: packages/metadata-protocol/src/protocol-write-face.ts#detectDestructiveObjectChanges.
  2. N3, a silent mapping key. A mapping key that is itself a stored unit code is ignored without a word. The report shows the value as already a unit code, but not that the operator's entry went unused. Code: packages/objectql/src/unit-code-backfill.ts.
  3. N4, a truncated preview. When the preview stops at maxRecords (default 100,000), an apply run still writes, although unseen rows may hold unmatched values. The report says truncated, as the currency twin's does, but "one run converts the whole field or nothing" is not literally kept.

Who benefits: an operator converting a large or reshaped object. Item 1 leaves a save that strands every stored row with no warning; items 2 and 3 leave a report that reads cleaner than the table is.

Done when

  • Item 1: the save raises a 409 DESTRUCTIVE_CHANGE finding (unit_mode_to_record's blank-debt wording, or a re-point finding named after currency_field_repointed), lifted by force: true, reading no row, with the once-only rule of newlyDeclaredUnitCodeFieldsOf kept. It is pinned in protocol-destructive-unit-mode.test.ts.
  • Item 2: the report names each mapping entry whose key is a stored code and that no row used.
  • Item 3: an apply run over a truncated preview is refused, or the report and CLI say plainly that unseen rows were not judged. Choose the shape against the currency twin record-currency-backfill.ts, and keep them alike.
  • The ADR-0158 Open item 9 trailing note and Open item 12 are amended to match.

Reader: area:data. Blocked-by: #35492 (PR #35865).

Grading: area:data · Task · review follow-up · evidence: L2 records 7041994401 (N3, N4) and 7045119376 (the re-point gap); dev report 7044992828 (out_of_scope_findings).
Suggested grade: p3 (unpublished surface until the R1 release; item 1 strands rows only on a rare re-shaping save). Item 1 could be cut alone if triage prefers.

Dedupe: repo:objectstack-ai/objectstack is:issue is:open unit_code_field_declared OR currency_field_repointed gives #35492 and the triage seat card; no follow-up card exists.

Activity

  1. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:server · pm:blocked (Blocked-by #35492; PR #35865); rationale: area:data · Bug · (1) re-pointing a record-mode quantity's unitField at a field added in the same save raises no destructive-change finding, after which every stored row sits beside a blank unit and its writes are refused (ERR_UNIT_CODE_REQUIRED); (2–3) two backfill report nits; reach: an admin who re-points in one save, rare; severity: stored rows become unwritable without a warning → p2 (the filed p3 is raised for item 1) · size S.

  2. added
    bug
    domain:server
    pm:blocked
    priority:p2
    and removed on Nov 20, 2026
  3. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Unlock (daily scan): every Blocked-by: target is closed, so pm:blocked → pm:queue; grade unchanged.

    Targets read this round, all closed in this repository: #35492 (and its PR #35865, merged). The body named it mid-sentence, which the line reader does not take. No Unlock-action: line, no assignee; same repository, so no installability check is owed.

  4. added
    pm:queue
    and removed
    pm:blocked
    on Nov 23, 2026
  5. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH

    Claim: PM loop (seat-run dev)
    Session: session_011y7As5bdhV5T4N9vpjmZzH
    Account: os-alice
    Branch: claude/issue-35885-unit-repoint-backfill-gaps
    Worktree: objectstack-issue-35885
    Domain: domain:server
    Seat: repo:objectstack#7
    File surface: packages/metadata-protocol/src/protocol-write-face.ts (detectDestructiveObjectChanges) + protocol-destructive-unit-mode.test.ts, packages/objectql/src/unit-code-backfill.ts and its tests, the backfill CLI report text in packages/cli/src/** only if item 3 needs it, .changeset/** (stop on breach; explain in the report)
    Container & model: M, mode:subagent, model: default opus (no path-derived mandate), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack (unit-code backfill door and destructive-change detection) | #35492 / PR #35865 (ADR-0158 R1) | an operator converting a large or reshaped object
    Thread-read: 7108933254
    Premise: holds (follow-up gaps disclosed in PR #35865)
    Serial constraints cleared: no seat PR in flight (concurrency 1).

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 25, 2026
  7. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH
    os-dev-report

    {
      "issue": 35885,
      "status": "done",
      "branch": "claude/issue-35885-unit-repoint-backfill-gaps",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37268",
      "session": "session_011y7As5bdhV5T4N9vpjmZzH",
      "head": "0237272ee3f9eee0f4ed263f354ef3eb12dbb684",
      "premise_still_valid": true,
      "summary": "Item 1: detectDestructiveObjectChanges now raises 409 DESTRUCTIVE_CHANGE / unit_mode_to_record (existing code, re-point wording) when a stored record-mode quantity's unitField is re-pointed at a field that held no stored unit before the save; it reads no row, force lifts it, and the newlyDeclaredUnitCodeFieldsOf once-only gate is shared, so a re-point onto stored text still raises unit_code_field_declared alone and one onto an existing unit code field still raises nothing. Item 2: a value stored as a unit code that is also a mapping key no row used carries unusedEntry in the report and gets a printed line. Item 3: report shape chosen, to match record-currency-backfill.ts, which also writes over a capped walk; the printed report (and so the CLI) now says the rows past the cap were not judged and an apply run wrote the examined rows only, plus the currency twin's unscoped organization-check line. The ADR-0158 Open item 9/12 amendment (Done-when item 4) is NOT in this PR: docs/adr/** is outside the claim's file surface and a Tier H path, so the PR says Part of #35885 and carries proposed amendment text in its Acceptance notes.",
      "tests": "head 0237272ee3f: typecheck objectql + metadata-protocol, then pnpm test for each, under the lock, VERDICT command-exit 0. metadata-protocol: Test Files 370 passed | 9 skipped (379), Tests 23417 passed | 45 skipped. objectql: Test Files 638 passed (638), Tests 14428 passed (14428). Ablations through scripts/ablation-replace.mjs, each restored (blob == HEAD, git diff HEAD empty). A1: the re-point predicate was neutralised and metadata-protocol rebuilt; dist-preflight found the marker in 2 built files; 3 failed / 21 passed; restore leg rebuilt with the marker absent from all 24 files. A2: unusedEntry assignment removed, 1 failed / 28 passed. A3: truncated wording blanked, 1 failed / 28 passed.",
      "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack derived 69 families on head 0237272ee3f. All were run locally; 68 exited 0. check:dual-build-cjs-loads exited 3, PREREQUISITE NOT MET (no full pnpm build), so it is NOT MEASURED and CI measures it. --ran: 69 derived, 69 run, 0 NOT-MEASURED, 0 UNRUN (the dual-build line corrects the runner claim). PR check-runs are not read here; the seat reads CI (in_progress at report time).",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm: the unit surface (unitConfig, unit_mode_to_record) is unreleased, still in pending changesets",
      "mcp_calls": "0",
      "api_writes": "3 — git push of the branch (not REST); relay pr_create = POST /repos/objectstack-ai/objectstack/dispatches -> pulls create + issues/37268/assignees; post-stamped os-dev-report comment POST /repos/objectstack-ai/objectstack/issues/35885/comments",
      "open_questions": [
        {
          "question": "The dispatch order said line 2 Fixes #35885, but the ADR-0158 amendment the card's Done-when owes is outside the file surface and Tier H, and os-dev.md says Part of when the merge should not close the card. Which should hold?",
          "options": [
            "A: keep Part of #35885 and let the seat land the ADR note as its own PR, using the proposed text in the PR body, then close the card",
            "B: the seat amends the PR body to Fixes #35885 and carries the ADR note separately with no card"
          ],
          "recommendation": "A, because closing the card on a code merge would leave the Done-when ADR item silently unmet"
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [],
      "deviations": "Did not merge the 4 newer origin/main commits before opening, which AGENTS.md multi-agent section 10 asks for; the diff is narrow and CI re-runs on the merge. Ran no CLI unit-codes tests locally, since packages/cli is untouched and the objectql face change is additive (an optional field); CI's Test Core runs them. The dispatch named protocol-destructive-unit-mode.test.ts under metadata-protocol, but it lives in packages/objectql/src and was edited there."
    }
  8. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-alice · session_011y7As92T28dA9wc7wtu3iE

    Closed as completed at 2026-11-25T12:01Z by the landing seat. The code half landed in PR #37268 (merged, Part of #35885). The card's remaining Done-when item, the ADR-0158 Open item 9 / Open item 12 amendment, is a docs/adr/** bookkeeping row and now lives on the weekly ADR card #37245 (row comment 7161785832, with the text from #37268's Acceptance notes), which lands as one governed PR (execution-duties.md 〈派发〉, ADR 记账行). This stroke releases the card (pm:dispatched → pm:queue, assignee cleared; landing-operations.md: a Part of card's remainder goes to a lane state), and the close follows at once as its own stroke — nothing on this card is left to dispatch.

  9. added
    pm:queue
    and removed
    pm:dispatched
    on Nov 25, 2026
  10. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#7 · os-alice · session_011y7As92T28dA9wc7wtu3iE

    Closing at 2026-11-25T12:02Z as completed, per the comment above (code in PR #37268; the ADR-0158 row on #37245).

  11. removed
    pm:queue
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:databugdomain:serverpriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions