Skip to content

sync-in P2 engine (epic #31763, ADR-0153): windowed and paged reads, committed position, delete marking, provenance, drift, sys_sync_run, organization scope #32062

Description

@objectstack-fleet

triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

Filing gate: ④ coordination node. This is a child of the epic #31763, filed from ADR-0153's 〈Children the epic files on acceptance〉 table (docs/adr/0153-one-way-sync-in-beside-federation.md, merged in #32014). domain:spec#2 asked triage to file it (mailbox comment 6760065220). ⛔ Not a claim.
Business reason: inherited from #31763 (p1). Sync-in turns external data, including a warehouse table, into ordinary objects that reports, joins and AI question answering can use. Every gap it closes (G1–G9) was measured in #31778.
Dedupe (open and closed): datasourceSource, sys_sync_run, managedBy synced. Only #31763, #31778 and #31780 match, and none of them is this child. New.
Part of #31763.
Blocked-by: #32061
Reader: the domain:server seat.
class: c · type: Feature

维护者速读

同步导入的主体:分页与窗口读取、只在提交后推进的读取位置、删除标记、来源字段、漂移拒绝、sys_sync_run 运行记录,以及组织范围。这是最大的一张卡(约 6–9 个 agent 日),排在 spec 卡之后。

Scope (ADR-0153's P2 engine row; the ADR is the spec)

  • D2 invariants. On a built-in driver, aligned windows are read whole with no cap and paged by the key. Bounded windows sit only below the run-start max(field) (invariant 12), with one more high-water read before the open-above window. Window widths and other tuning are this child's call.
  • Floored drivers. The windowed read lo <= field < hi runs through the floor, with the halving.
    • ExternalRowCapExceededError carries the row count and the watermark values, on the error object only.
    • The refusals are sync_window_unsplittable and sync_bounds_not_pushed.
  • Keys and the commit point.
    • The BIGINT key and integer-watermark client default is verified per dialect, and an out-of-range value is refused at run time.
    • A window commits only at its end. The connector paging loop commits once, after its last page.
  • D3, deletes: marking with the completeness rule and its range limit, the NULL-watermark count, and the incremental-mark refusal.
  • D4, provenance: _sync_ stamping, the injected-column plan rows (resolveInjectedSystemColumns), the _sync_ write refusal and the purge.
  • D6: the three drift arms and the record-level watermark refusal.
  • D7: sys_sync_run with its writer, retention, the end-of-pull log line and the interrupted-run close.
  • D8: the organization predicate and source_organization_scope_unstated, at boot and at the install route, with JOB_ORGANIZATION_DESCRIPTION rewritten.
  • ExternalRowCapExceededError's remedy is re-pointed from DataSync to sync-in.
  • Conformance cases for both read paths, exactly as the ADR row lists them.
  • Each planned row flips to live with its reader, and its authorWarn is dropped.

Declaration

Clause-②: no (narrowing). D8 makes job.organization required for a pull job under group, and D3's refusal narrows. Metadata-protocol: narrowed.

Size L (≈ 6–9 agent-days). Order: after P2 spec.
Grade: p1, inherited from #31763.


Generated by Claude Code

Activity

  1. added
    enhancement
    priority:p1
    pm:blocked
    pm:blocking
    domain:server
    on Nov 10, 2026
  2. objectstack-fleet commented on Nov 10, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#3 · os-support-ai · session_01WGufzh7cM8EmUX4T2CBNHX

    Carrier note from the contract review of PR #32118 (card #32061, sync-in P2 spec; record 6762969887). ⛔ Not a claim. The spec child leaves these run-time edges to this card's readers. Each is within ADR-0153's letter, and each was graded a nit on the spec side.

    1. source_key_not_exact when the source declares no id field. The build judges the key's exactness only when the source object declares id (packages/spec/src/stack.zod.ts ~L4826, ~L4902). A remote BIGINT key mapped onto an undeclared id passes the build, so the engine's run-time refusal has to cover it.
    2. A sourced mapping in a stack with no objects. collectSourcedMappingErrors runs after the zero-objects early return (~L5604 vs ~L5700), so such a stack gets no synced-target or source-object judgment at build. This is inherited from the existing targetObject rule. The engine refuses at run time.
    3. Finding names as tokens. No ADR-0112 codes were registered for source_key_missing, source_key_not_exact, watermark_not_exact or watermark_field_unmapped; the envelope code carries them. The run-time refusals reuse the same tokens verbatim.
    4. watermark_field_unmapped for connectorSource. It is judged at build for datasourceSource only, as D3 has it. The connector keeps the executor's run-time check.
    5. Re-parsing injected columns. The _sync_ reservation sits in the ObjectSchema.fields key grammar, so resolveInjectedSystemColumns output must never be parsed through ObjectSchema again after injection.
    6. Gaps the ADR does not name (close them here or in a dated ADR-0153 note):
      • a synced target that itself carries an external binding;
      • a source object equal to the target;
      • an upsertKey that no fieldMapping entry writes, which matches nothing and duplicates every run (packages/spec/src/data/mapping.zod.ts ~L669).
    7. Remedy sentences that turn false. packages/cloud-connection/src/marketplace-install-local-plugin.ts ~L1111 tells the author to add a connectorSource and says os validate refuses the same pull. Both are false for a datasourceSource pull until this card lands.
  3. objectstack-fleet commented on Nov 10, 2026

    @objectstack-fleet
    ContributorAuthor
  4. added
    pm:queue
    and removed
    pm:blocked
    on Nov 10, 2026
  5. objectstack-fleet commented on Nov 10, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#7 · os-justin · session_01QSeKYm8sWjp2Pk76warN7w

    Claim: PM loop round 1
    Session: session_01QSeKYm8sWjp2Pk76warN7w
    Account: os-justin
    Branch: claude/issue-32062-sync-in-p2-engine
    Worktree: objectstack-issue-32062 (cloud container)
    Domain: domain:server
    Seat: domain:server#7
    File surface: ADR-0153's P2 engine row is the scope. Expected landing: packages/services/service-automation (job.pull, connector-pull.ts, a sys_sync_run object and writer beside sys-automation-run.object.ts), packages/objectql/src/external-driver-floor.ts and external-driver-errors.ts (windowed read, halving, the ExternalRowCapExceededError remedy), packages/metadata-core/src/injected-system-columns.ts (_sync_ plan rows), the packages/metadata-protocol _sync_ write refusal, driver conformance cases, packages/spec/liveness/*.json rows this engine reads (planned → live, authorWarn dropped) and only those spec lines; packages/services/service-job only for the D8 organization predicate; their tests; root .changeset/. ⛔ Not docs/adr/**, no other packages/spec/src/** change (a needed one is reported, not made). Delivered in slices: each PR Part of #32062, the last one closes the card. Stop on breach; explain in the report.
    Container & model: L, mode:cloud, model: opus (default judgment tier; no path-derived mandate; build-heavy across packages/spec and other packages, so a cloud container), effort: xhigh (p1, L)
    Clause-②: no (narrowing)
    Metadata-protocol: narrowed
    Responsibility: n/a — not a defect card
    Thread-read: 6766620696
    Premise: holds (read-only premise reading at 2026-11-10T13:43Z, origin/main e1146e80: #32061 closed via #32118; sys_sync_run, sync_window_unsplittable and source_organization_scope_unstated have zero hits in code, positive control 10 hits in the ADR; mapping.json sync-in rows are planned)
    Serial constraints cleared: none of the live server claims names connector-pull.ts, external-driver-*, injected-system-columns.ts or liveness/mapping.json; #32073 (seat 3) holds service-automation plugin.ts (a slice that must touch it waits for that card to land and says so)

    Dispatched 2026-11-10T13:48Z.

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

    @objectstack-fleet
    ContributorAuthor

    domain:server#7 · os-justin · session_01QSeKYmycB2eTbWXTULu4zX
    os-dev-report

    {
      "issue": 32062,
      "status": "done",
      "slice": "1 of the proposed 6 (PR body: Proposed slice order); Part of #32062, the card stays open",
      "branch": "claude/issue-32062-sync-in-p2-engine",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/32275",
      "session": "session_01QSeKYmycB2eTbWXTULu4zX",
      "premise_still_valid": true,
      "summary": "Slice 1 of the sync-in P2 engine: the windowed read of a datasource source on both ADR-0153 D1 paths (built-in: canon-aligned windows paged by key, bounded only below the run-start high-water value, a second high-water read before the open-above window; floored: open-above first, bounded windows below the largest value an over-cap answer showed, halving, sync_window_unsplittable and sync_bounds_not_pushed), the invariant-9 commit at a window's end, the organization conjunct on every read, and the run-time exactness refusals (source_key_not_exact, watermark_not_exact, plus watermark_start_invalid). ExternalRowCapExceededError now carries the returned rows in a private field (returnedRowCount, returnedValuesOf) and its remedy points at sync-in instead of DataSync. The reader has no caller yet; wiring it to job.pull is slice 2, which is blocked on the contract question below. Premise readings held on b6fc8908: #32061 closed via #32118, zero code hits for sync_window_unsplittable before this PR, ExternalRowCapExceededError remedy named DataSync, resolveInjectedSystemColumns carries no _sync_ rows, mapping.json sync-in rows planned. Assignee untouched (claim's Account os-justin carried by pr_create).",
      "tests": "head 647ec91d. pnpm --filter @objectstack/objectql test: Test Files 584 passed (584), Tests 12047 passed (12047), exit 0. pnpm --filter @objectstack/service-automation test: Test Files 271 passed (271), Tests 3585 passed (3585), exit 0; the changed test file re-run after the last commits: 25 passed (25), VERDICT command-exit 0. Ablations, each via scripts/ablation-replace.mjs (anchor 1 -> 0, blob changed, restored blob == HEAD, git diff HEAD empty; subjects resolve from source in their own test files, so no dist leg): (1) sync_window_unsplittable reason swapped: 2 failed / 23 passed; (2) sync_bounds_not_pushed guard deleted: 3 failed / 22 passed; (3) source_key_not_exact guard deleted: 2 failed / 23 passed; (4) watermark_not_exact answered NaN: 2 failed / 23 passed; (5) watermark_start_invalid answered 0: 1 failed / 24 passed; (6) floor passes no rows to the refusal: external-driver-floor.test.ts 1 failed / 65 passed.",
      "gates": "local, head 647ec91d: dispatch-gates --commands derived 69 families; all 69 run, every one exit 0; --ran with recorded exit codes: '69 derived famil(ies) accounted for — 69 run, 0 NOT-MEASURED (a DERIVED zero — all 69 recorded an exit code and none of them is 3)'. Prerequisites met first, not skipped: check-plugin-teardown-shape --self-test after a depth-1 fetch of its pinned control commit 621a4876 (shallow clone), check:dual-build-cjs-loads after the dogfood build closure (122 entry points / 72 packages load). pnpm lint exit 0. Outside the derivation: check:error-code-casing 0, check:filter-alias-parity 0, check-platform-checklist --changed-from origin/main 0. Typecheck: objectql and service-automation typecheck exit 0, check:test-typecheck OK for both. Build closure '@objectstack/service-automation...' VERDICT 0. Driver conformance ledger before and after: 66 covered, 6 DEBT, 0 exempt (unchanged). CI: PR check-runs at 647ec91d answered total_count 0 when this report was written — in_progress, not yet reported; the PM reads CI convergence.",
      "dogfood_battery": "647ec91d · os-verify-lock: VERDICT command-exit 0 (held 33m13s) · Test Files 446 passed, 3 skipped (449) · Tests 3712 passed, 42 skipped (3754) · no failures",
      "line_budget": "8 files, +1322 / -51 (1373 changed lines, under the 3,000 line class (c) threshold)",
      "files_changed": [
        ".changeset/32062-sync-in-windowed-read.md",
        "packages/objectql/src/external-driver-errors.ts",
        "packages/objectql/src/external-driver-floor.ts",
        "packages/objectql/src/external-driver-floor.test.ts",
        "packages/services/service-automation/src/connector-pull.ts",
        "packages/services/service-automation/src/datasource-window-read.ts",
        "packages/services/service-automation/src/datasource-window-read.test.ts",
        "packages/services/service-automation/src/pull-refusal.ts"
      ],
      "deviations": [
        "Worktree: the card branch was checked out on the primary checkout by the harness; it was detached there and the branch checked out in ../objectstack-issue-32062 (worktree-first), no history change.",
        "The reader ships with no caller in this slice (dead until slice 2), so no liveness row flips here; declared in the PR's Acceptance notes.",
        "A stray 6-byte file /lint.pid (outside the repo) was written by a mis-scoped shell variable; the safety check refused its removal, so it is left for the operator.",
        "Commit trailers are the AGENTS.md model-free pair; the harness's model-named trailer was not used (AGENTS.md takes precedence)."
      ],
      "mcp_calls": "0 — no MCP GitHub tool called",
      "api_writes": "2 — POST /repos/objectstack-ai/objectstack/dispatches (pr_create through the fleet-write relay, run 42850705881, opened #32275 as draft with assignee os-justin); this report comment through scripts/pm/post-stamped.mjs. git push is not a REST write.",
      "open_questions": [
        {
          "question": "FORK, blocks slice 2: IAutomationService.pullConnectorSource returns ConnectorSourcePullResult, whose connector and action are required strings (packages/spec/src/contracts/automation-service.ts). A datasource pull through the same contract method has neither. The runtime binder (packages/runtime/src/app-artifact-handlers.ts, judgeJobPull + pullRunOutcomeOf) calls only this method. This lane makes no packages/spec/src change.",
          "options": [
            "A — the spec lane widens the contract: a source discriminator on the result (e.g. a datasourceSource arm naming the object and datasource, connector/action kept for the connector arm); cost: a published TS interface change and its consumers, about half a day on the spec lane",
            "B — fill connector with the datasource name and action with a fixed word for a datasource pull; cost: zero, but every reader of result.connector is told something false",
            "C — a second contract method for a datasource pull; cost: a new optional method, a second binder branch, more surface than the ADR names"
          ],
          "recommendation": "A, because the result is read by the binder and by any operator surface as 'where the rows came from'; B is a lie on a machine-readable surface and C doubles the door for one shape difference"
        },
        {
          "question": "Lane conflict, blocks slices 3 and 6: ADR-0153's P2 engine row puts the _sync_ plan rows in packages/spec/src/data/injected-system-columns.ts (resolveInjectedSystemColumns) and rewrites JOB_ORGANIZATION_DESCRIPTION in packages/spec/src/system/job.zod.ts; the dispatch forbids packages/spec/src changes in this lane beyond the liveness rows. Not chosen silently.",
          "options": [
            "A — the seat authorizes those two spec lines for this card (both are named by the accepted ADR row; the describe rewrite only restates D8's ruling)",
            "B — the spec lane carries them in a sibling PR that this card's slices then read"
          ],
          "recommendation": "A, because the ADR row assigns both to the engine child and a sibling PR adds a cross-lane ordering dependency for two small edits"
        },
        {
          "question": "Where sys_sync_run is registered (D7, slice 2): beside SysAutomationRun in service-automation's plugin.ts registerRunObject (held by #32073), beside SysJob / SysJobRun in service-job's job-service-plugin.ts (the claim allows service-job only for D8), or as a platform-objects object registered by the runtime.",
          "options": [
            "A — service-automation plugin.ts, after #32073 lands (the writer's own package; waits)",
            "B — service-job's plugin beside sys_job_run, the record it links (no wait; widens the claim's service-job use)"
          ],
          "recommendation": "A, because the pull executor is the one writer and the manual trigger needs no job service; the wait is one card"
        },
        {
          "question": "Every over-cap read during halving is logged by the engine's find middleware as one WARN 'Find operation failed' with the refusal's message and stack (measured in this suite's output). A large source halved many times writes many such lines per run.",
          "options": [
            "A — leave it; one summary info line per pull lands with D7",
            "B — the windowed read passes a read option that the engine's find honours by not warning on EXTERNAL_ROW_CAP_EXCEEDED (an engine option, objectql)"
          ],
          "recommendation": "A for now, because the lines carry no row data and an engine option is a wider change than the pull needs; revisit if an operator reports the noise"
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: none (stale comment) · packages/spec/src/api/error-code-ledger.zod.ts still describes the EXTERNAL_ROW_CAP_EXCEEDED remedy as 'mirror the data with DataSync' in a code comment; not edited (no spec src change in this lane) · carrier: the slice or lane that next touches that file · noted, not filed"
      ]
    }
  8. 49 remaining items

  9. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzg3KqwSpt61Y8ovKK7

    Claim: PM loop round 1 (zone wf-A) · slice 6
    Session: session_01WGufzg3KqwSpt61Y8ovKK7
    Account: os-support-ai
    Branch: claude/issue-32062-sync-in-d3-deletes
    Worktree: objectstack-issue-32062
    Domain: domain:server
    Seat: repo:objectstack#3
    Area: wf-A
    File surface: slice 6 = ADR-0153 D3 (delete marking) + N1–N5 of contract record 6791935060 + slice-5 carried nits N1/N4/N8/N9 (records 7119012685, 7120208665). packages/services/service-automation/src/** (connector pull, window read, sync-run, provenance stamp), packages/spec/src/data/mapping.zod.ts and packages/spec/liveness/mapping.json rows for D3 only, the sys_sync_run object definition, sync-in/jobs content/docs/**, changesets. New logic in sibling modules (packages/objectql/src/registry.ts has zero facade headroom). Anything else is declared in the report with its reason.
    Container & model: L (this slice M–L), mode:subagent, model: default — dispatch-gates.mjs --tier: "Model tier — no path-derived mandate"; packages/spec/src/** touched ⇒ CONTRACT_REVIEW_TIER review owed, effort: high
    Clause-②: no (narrowing) (the incremental-mark refusal; to be measured on the diff) — owes one CONTRACT_REVIEW_TIER review, run by L1-w
    Metadata-protocol: to be measured (narrowed if an authorable value that was accepted is refused)
    Responsibility: n/a — not a defect card
    Thread-read: 7122297060
    Premise: holds — measured on origin/main 517e415: _sync_deleted_at is planned (packages/spec/src/data/injected-system-columns.ts:112) and unstamped (packages/services/service-automation/src/sync-provenance-stamp.ts:15); deletePolicy is liveness planned under both sources (packages/spec/liveness/mapping.json:121, :174); slice 5 (PR #36795, D4 columns) merged as 1d28405.
    Serial constraints cleared: slices 1–5 merged (#32275 #32339 #32385 #32405 #36795); no open PR touches the sync-in files (open PR sweep 2026-11-24T22:15Z: only the release PR #35129, changeset only).
    Pre-claim lane: domain:server — packages/services/service-automation/src/** is the sync-in engine; the packages/spec/src/data/mapping.zod.ts + liveness rows stay in this lane by the lane-keep rule (narrowing only).
    Pre-claim deps: Blocked-by: #32061 closed; slice 5 (#36795) merged 2026-11-24T04:43Z.
    Prior rulings read: deletepolicy,_sync_deleted_at,delete-marking → 1 hits (ADR-0153 D3, docs/adr/0153-one-way-sync-in-beside-federation.md:383); none conflicting; thread: none; repo: objectstack-ai/objectstack. ADR open points L852/L854 stay open: no refusal of two mappings per target.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzg3KqwSpt61Y8ovKK7
    os-dev-report

    {
     "issue": 32062,
     "status": "done",
     "branch": "claude/issue-32062-sync-in-d3-deletes",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/37179",
     "head": "167cb91793e160e32b009b99ea34120b94dc7932",
     "session": "session_01WGufzg3KqwSpt61Y8ovKK7",
     "premise_still_valid": true,
     "summary": "Slice 6 of #32062 (resumed from be5a27be75): ADR-0153 D3 delete marking on both sync-in read paths via a new sibling module sync-delete-mark.ts (deletedField mark/clear on any pull; absence mark on a complete full pull: datasource full:true with zero NULL-watermark count under the org predicate and the range limited to copied watermark >= watermark.start; connector only under paging style none, else unjudged with the reason), sys_sync_run gains marked_deleted_count / deletes / skipped_null_watermark, the incremental-mark refusal at parse (incrementalSourceDeleteRefusal, new spec export) and at run time (delete_policy_unhonourable), liveness deletePolicy/deletedField flipped live on both sources, migration entry incremental-source-delete-policy-stated. Nits: 6791935060 N1 N2 N3 N5 done, N4 not fixable in a code PR (released CHANGELOG entries); 7119012685/7120208665 N1 N4 (stated, no ruling, L854 open, no two-mappings refusal) N8 N9 done. This resume added the N9 read-failure pin and stated the reordered-upsertKey refused-row edge.",
     "tests": "head 167cb91793, under os-verify-lock: service-automation test+typecheck Test Files 294/294, Tests 4306/4306, VERDICT command-exit 0; spec test Test Files 890/890, Tests 28304 passed + 1 todo, exit 0; spec typecheck 0; spec check:generated 0 (14 artifacts up to date); runtime typecheck 0. Ablation (markAbsent stamp removed via ablation-replace.mjs, anchor 1->0, blob 2ea95069cb8c->e2a75eeead57): datasource-pull + connector-pull Tests 7 failed / 118 passed, VERDICT command-exit 1; restored blob == HEAD, git diff HEAD empty; suite imports src by relative path, no dist leg.",
     "gates": "local: dispatch-gates --commands at 167cb91793 = 124 commands, exits captured before pipes; --ran: 124 derived, 121 run, 3 NOT-MEASURED, 0 UNRUN. NOT MEASURED (exit 3 prerequisite): spec check:skill-examples and check:dual-build-cjs-loads (client-react dist not built here), check:type-check-debt (queued past 540s behind the dogfood run). spec check:exported-any / check:generated / check:dts-closure first read a dist mid-rebuild, re-run 0. CI on 167cb91793: 60 success, 10 skipped, 0 failure: Lint & Repo Gates, TypeScript Type Check, Test Core (10 shards), Build Core, Governed Surface Queue Guard, Type Check UI, Test UI (16), Build & E2E UI, Live E2E UI, Dogfood Regression Gate, Check Changeset, PR-body guards all success; Lint UI skipped. mergeable true, not dirty.",
     "dogfood_battery": "167cb91793 · VERDICT command-exit 1 · Test Files 1 failed / 486 passed / 3 skipped (490) · Tests 1 failed / 4127 passed / 68 skipped (4196) · failure: approval-flow-name-per-namespace.dogfood.test.ts timed out at 5000ms under memory pressure (kernel OOM kill during the run); re-run alone Test Files 1/1, Tests 2/2, VERDICT command-exit 0; not sync-in",
     "line_budget": "PR #37179 +1204 / -96 = 1300 changed lines, 27 files (under 3000 for this PR; the card-wide count across slices is the seat's)",
     "governed": "check-governed-merges --pr 37179: NOT governed (0 of 27 paths), size 1300, at most 3000",
     "declarations": "Clause-②: no (narrowing) · Metadata-protocol: narrowed · Skills-docs: none (0 skills/ hits for deletePolicy|deletedField|_sync_deleted_at, control hits)",
     "files_changed": 27,
     "deviations": [
      "runtime package test not run locally: the runtime diff is two optional type members (typecheck 0); Test Core green in CI",
      "3 derived local gates NOT MEASURED (exit 3 prerequisite), CI ran them green",
      "dogfood one 5s timeout under load, re-run green",
      "the merge commit 167cb91793 carries git's default message without the session trailer pair",
      "PR body carries the os-dev 维护者速读 section in Chinese while the seat standard order says GitHub is English: os-dev.md wins on this section, flagged"
     ],
     "mcp_calls": "0",
     "api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls, POST /repos/objectstack-ai/objectstack/issues/37179/assignees), post-stamped comment (POST /repos/objectstack-ai/objectstack/issues/32062/comments); plus git push x2 (not REST)",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "N4 of record 6791935060: the dangling 'see its own entry' sits in released CHANGELOG entries (packages/cli/CHANGELOG.md:1203, packages/spec/CHANGELOG.md:3173; the same phrase in cloud-connection, objectql, runtime, spec :3153); released-entry correction is a docs-only PR · carrier: seat (repo:objectstack#3) · noted, not filed"
     ],
     "dev_effort": "high",
     "rounds": "1 (resumed)"
    }
  12. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzg3KqwSpt61Y8ovKK7

    Claim amendment · 2026-11-25T02:41Z · to claim 7145967588 (slice 6, PR #37179), per L1 7151052312 S1

    File surface, widened by the files slice 6 needs as direct consequences (each with its reason in the PR body's acceptance notes): packages/objectql/src/sync-provenance-write.ts (the N8 docblock sentence in refuseHookSyncProvenanceWrite), packages/runtime/src/job-handler-context.ts (N1: trigger / runId named on JobHandlerContext), packages/spec/src/data/injected-system-columns.ts and packages/spec/src/data/injected-system-column-provenance.ts (the _sync_deleted_at description, now stamped), the spec migration entry packages/spec/src/migrations/entries/semantic/18.incremental-source-delete-policy-stated.ts (ADR-0087 mark for the narrowing), the generated artefacts they drive (packages/spec/api-surface/data.json, packages/spec/export-origins/data.json, packages/spec/liveness/object.json, packages/spec/liveness/state-counts/mapping.md), and for the fix round packages/spec/docs/SYNC_ARCHITECTURE.md (the ordersPull example the refusal now rejects, L2 S2). Everything else in the claim stands.

  13. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzg3KqwSpt61Y8ovKK7

    Claim note · 2026-11-25T02:43Z · to claim 7145967588 (slice 6, PR #37179), per L2 7151034259 S4 and the seat

    Two mappings on one target: slice 6 marks, for each mapping, only the rows that carry that mapping's own _sync_source, and it refuses no second mapping on the same target. This is the behaviour this slice ships, so a second mapping can never mark the first one's rows. ADR-0153's open point (L854) is not edited here. The cross-package residual (two packages' same-name mappings share one bare-name _sync_source) is a separate triage carrier and is not fixed in this card.

  14. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Item for this card, not a separate card 2026-11-25T02:44Z. Raised by repo:objectstack#3's filing request 7151072321, from PR #37179's contract review 7151034259, S4 residual.

    • Same-name mappings from two packages on one target mark and clear each other's rows.
      • _sync_source stores the bare mapping name, but a mapping's identity is the holder package plus the name (record 6786503520, S1).
      • markAbsent (slice 6, PR feat(service-automation)!: a sync-in pull marks the rows the source deleted (ADR-0153 D3, #32062 slice 6) #37179) selects rows by _sync_source. So when packages A and B each ship a mapping named x onto the same target, each full pull marks the other's rows deleted, and the other's next pull clears the mark again, run after run.
      • Fix (pick one before this card closes):
        • Store a package-qualified source identity, with a migration for existing rows.
        • Or refuse a second mapping with the same name on a target at registration.
      • Add a pin for the two-package case.

    Why here and not a card: the delete marking is still being built (PR #37179 is open, and this card is dispatched). The filing gate keeps a defect in unmerged code in that feature's own card and PR. Size S. It rides PR #37179 or the next slice, and must land before this card closes.

  15. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzg3KqwSpt61Y8ovKK7

    Claim note · 2026-11-25T02:44Z · supersedes the wording of note 7151103856 (seat ruling)

    Two mappings on one target: decided here. Each mapping marks and clears only rows whose _sync_source is its own; a second mapping is not refused. Cross-package same-name residual carried to triage (#36743).

  16. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzg3KqwSpt61Y8ovKK7
    os-dev-report

    {
     "issue": 32062,
     "status": "done",
     "branch": "claude/issue-32062-sync-in-d3-deletes",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/37179",
     "head": "0f46c642ca89768b5124a5439c1119ae4ee5142f",
     "session": "session_01WGufzg3KqwSpt61Y8ovKK7",
     "premise_still_valid": true,
     "summary": "Fix round 2 of slice 6 (resumed from 167cb91793, merged origin/main as 677bad4d25). M1: SyncDeleteMarker.afterBatch counts every read row with no _sync_external_id and canMarkAbsent() is false when any exists, so the run records 'unjudged, rows refused' and marks nothing by absence; pinned on both pulls plus a unit pin, which also gives the 'unjudged, rows refused' arm its first tests. S1: afterBatch sends keys 500 per $in (KEYS_PER_FILTER; no shared repo helper exists outside cli's private IN_CHUNK=200), pinned. S2: SYNC_ARCHITECTURE ordersPull states deletedField. S3: entry 18, changeset and jobs.mdx name the systemFields:false arm and say os validate does not catch it; no parse refusal added. S4: PR body carries the seat's Decision text verbatim; the marker doc no longer calls L854 open; no docs/adr edit. L1 M1: '@objectstack/objectql': patch added. Nits N1-N8 fixed on the same files; N9 answered in this report's deviations.",
     "findings": {
      "L2 M1": "fixed: sync-delete-mark.ts unnamed counter, canMarkAbsent false on any keyless read row; pins datasource-pull.test.ts '[review M1] a read row with a blank match key...', connector-pull.test.ts two '[review M1]' cases, sync-delete-mark.test.ts unit pins (1000/1001 limit, keyless row); ablation 4 red",
      "L2 S1": "fixed: KEYS_PER_FILTER = 500 per $in on mark and clear; pinned 500/500/1 and 500/1 in sync-delete-mark.test.ts",
      "L2 S2": "fixed: packages/spec/docs/SYNC_ARCHITECTURE.md ordersPull adds deletedField: 'is_deleted' with a one-line comment",
      "L2 S3": "fixed by the document route: entry 18 surface/replacement/acceptanceCriteria name the systemFields:false arm and that os validate does not catch it; changeset and jobs.mdx say the same; no new parse-time refusal",
      "L2 S4": "PR body ## Decision carries the seat text verbatim plus one line on tree behaviour; sync-delete-mark.ts doc rewritten to the decision and #36743; no docs/adr edit; residual card is the seat's (#36743)",
      "L1 M1": "fixed: '@objectstack/objectql': patch in .changeset/32062-sync-in-delete-marking.md",
      "N1": "fixed: stamp() counts marked/cleared per row; unit pin (failure at row 3 keeps marked=2)",
      "N2": "fixed (documented): truthiness and silent misspelt connector field in jobs.mdx, changeset, marker doc",
      "N3": "fixed: countNullWatermarks projects fields ['id'] (floored and paged fallback); SyncWindowQuery gains optional fields",
      "N4": "fixed: syncDeletePolicyRefusal refuses a stored deletePolicy outside mark/ignore with delete_policy_unhonourable on both pulls; pinned on both",
      "N5": "fixed: connectorSource deletePolicy/deletedField evidence names connector-pull.ts#pullOnce, pullConnectorSource kept beside it for the executor pin",
      "N6": "fixed: sys_sync_run.deletes description says it is also empty for a connector target with no provenance columns",
      "N7": "fixed: changeset and jobs.mdx say a row pulled before the provenance columns existed is no mapping's and is never marked",
      "N8": "fixed: entry 18 acceptanceCriteria name the failed sys_sync_run (delete_policy_unhonourable / mapping_target_refused) as the run-time signal",
      "N9": "answered: deviations below list the files outside the claim's surface"
     },
     "tests": "head 0f46c642ca. service-automation test+typecheck (at 357423a92b, code identical): Test Files 295/295, Tests 4316/4316, VERDICT command-exit 0; the three touched suites: Tests 135/135, VERDICT command-exit 0. spec test+typecheck at 0f46c642ca: Test Files 890/890, Tests 28308 passed | 1 todo, VERDICT command-exit 0 (red at 357423a92b on the first N5 spelling, fixed). Ablation of the M1 fix via ablation-replace.mjs (anchor 'return this.unnamed === 0 && this.unwritten.size' 1->0, blob 5707ffa9842a->a7b315ca2f01): Tests 4 failed | 131 passed, the four M1 pins exactly, VERDICT command-exit 1; restored blob == HEAD, git diff HEAD empty; relative src import, no dist leg.",
     "gates": "dispatch-gates --commands = 124; --ran with exit codes: '124 derived, 124 run, 0 NOT-MEASURED, 0 UNRUN' (derived zero). First pass at 357423a92b: 121 exit 0, cli migrate-meta-engine-guidance exit 1 (MODULE_NOT_FOUND @objectstack/mcp/dist, closure unbuilt), spec check:skill-examples and check:dual-build-cjs-loads exit 3; after closure build all three exit 0 at 0f46c642ca; check:liveness, check:upgrade-guide, check:generated, check-nul-bytes re-run exit 0 at 0f46c642ca. CI on 0f46c642ca: 62 success, 12 skipped, 0 failure (incl. re-runs after the body edit); mergeable_state clean. The earlier reds on 677bad4d25 (Lint & Repo Gates, TypeScript Type Check, Test UI) were aggregators over lanes cancelled by the next push, not failures.",
     "ci_result": "green on 0f46c642ca: 62 success / 12 skipped / 0 failure; mergeable_state clean; draft",
     "dogfood_battery": "0f46c642ca · VERDICT command-exit 0 (held 33m39s) · Test Files 487 passed | 3 skipped (490) · Tests 4128 passed | 68 skipped (4196) · no failures",
     "line_budget": "PR #37179 now +1427 / -96 = 1523 changed lines, 29 files; this round +223 lines, 2 new files (sync-delete-mark.test.ts, SYNC_ARCHITECTURE.md edit). Card-wide Tier H count is the seat's",
     "declarations": "unchanged: Clause-②: no (narrowing) · Metadata-protocol: narrowed · Skills-docs: none (git grep skills/ for deletePolicy|deletedField|_sync_deleted_at exit 1 at 0f46c642ca, control hits)",
     "files_changed": 29,
     "deviations": [
      "files outside the original claim surface (claim amended by the zone): packages/objectql/src/sync-provenance-write.ts, packages/runtime/src/job-handler-context.ts, packages/spec/src/data/injected-system-column-provenance.ts, packages/spec/src/data/injected-system-columns.ts, packages/spec/src/migrations/entries/semantic/18.incremental-source-delete-policy-stated.ts, packages/spec/api-surface/data.json, packages/spec/export-origins/data.json, packages/spec/liveness/state-counts/mapping.md, and this round packages/spec/docs/SYNC_ARCHITECTURE.md",
      "N4 adds a run-time refusal arm (stored deletePolicy outside the enum) under the existing reason delete_policy_unhonourable; the parse already refuses it, so no authorable surface moves",
      "service-automation full suite ran at 357423a92b; 0f46c642ca only changes spec/liveness/mapping.json evidence text, so it was not re-run in full (touched suites re-run green)",
      "the 124-gate first pass ran on 357423a92b while the N5 liveness edit landed mid-run; check:liveness re-run green at 0f46c642ca",
      "S1 chunk size: no reusable bound-parameter helper in a package service-automation can import (cli's IN_CHUNK=200 is private to cli); reused the marker's own 500 page size as KEYS_PER_FILTER",
      "PR body keeps the os-dev 维护者速读 section in Chinese (os-dev.md) under a seat order that says GitHub is English, as in round 1"
     ],
     "mcp_calls": "0",
     "api_writes": "2 — relay issue_patch PATCH /repos/objectstack-ai/objectstack/issues/37179 (PR body, read-back identical 13620 bytes); post-stamped comment POST /repos/objectstack-ai/objectstack/issues/32062/comments (this report); plus git push x4 (not REST)",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "bare-name _sync_source: two packages' same-name mappings on one target share a _sync_source and mark/clear each other's rows · carrier: seat (#36743, filed by the seat)",
      "N4 of record 6791935060 (released CHANGELOG 'see its own entry') · carrier: seat · noted, not filed"
     ],
     "dev_effort": "high",
     "rounds": "2",
     "model": "claude-opus-5-5"
    }

    Generated by Claude Code

  17. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-support-ai · session_01WGufzg3KqwSpt61Y8ovKK7

    Release · back to pm:queue · 2026-11-25T05:09Z

    Seat 3 zone wf-A stops taking this card. The maintainer said at 2026-11-25T02:44Z: 「workflow 当前任务处理完,后续只处理 p1」. Slice 6 was the work in hand and has landed, so the card goes back to the queue for whichever seat takes its next slice.

    Landed under claim 7145967588: slice 6 is PR #37179, merged 2026-11-25T05:08Z as 8236d9b (Tier H by card size, approved and queued by os-zhuang; L1 ACCEPT 7152961674, L2 PASS 7152947987 / 7152998660). It ships ADR-0153 D3 delete marking on both sync-in read paths: deletePolicy / deletedField are live, _sync_deleted_at is stamped and cleared, sys_sync_run records marked_deleted_count / deletes / skipped_null_watermark, and an incremental source under 'mark' with no deletedField is refused at parse and at run time (Clause-②: no (narrowing), Metadata-protocol: narrowed). Decision stated in the PR: two mappings on one target each mark and clear only their own _sync_source rows; no refusal.

    Open for the next holder (later slices, per the PR body): D4 purge, D6 drift, D8 refusals beyond what landed, the connector paging loop. Carried items: the cross-package same-name _sync_source residual (item 7151120322 on this card); a build-time refusal of the systemFields: false arm (with triage as a spec-lane carrier); N4 of record 6791935060, the released CHANGELOG line (with triage, #36743 7150804863); accepted nits N1 (under-counted marked_deleted_count when a run throws mid-mark) and N10 from record 7152947987.

    No branch to resume from: everything is merged. #32063 and #32064 (Blocked-by this card's slices) are released by the seat, not claimed here.

  18. added
    pm:queue
    and removed
    pm:dispatched
    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:workflowdomain:serverenhancementpm:queuepriority:p2

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions