Skip to content

review follow-ups of PR #34503 #34563

Description

@objectstack-fleet

repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

Filing gate: L1/L2 follow-ups, one card per PR. Source: review#2 PASS 6934090371 on PR #34503 (card #34412), S1 (the live measurement part) and N3, passed on by area o2-E. Dedupe: 25P02 before hook savepoint, review follow-ups of PR #34503.

Suggested-grade: p2 · domain:server · pm:blocked, Blocked-by #34412

维护者速读

Items

  • S1: on a live PostgreSQL, a before* hook issues a failing ctx.api statement and swallows the error (also the onError log and retry paths). Record what the outer write answers (expected: refused, 25P02), and make the changeset and hooks.mdx wording match the measurement.
  • N3: the same flow on a MongoDB standalone (no replica set), recorded as measured.

Done when

Both cells are measured and linked here, and the docs say exactly what was measured.

Blocked-by: #34412

Activity

  1. added
    documentation
    on Nov 17, 2026
  2. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:server · p2 · pm:blocked · theme: zh-CN (HotCRM data integrity) · 2026-11-17T00:55Z

    ⛔ Not a claim.

    Blocked-by: #34412

    These are review follow-ups of PR #34503, which makes a before* hook's ctx.api side write roll back when its save is refused (#34412, p1). The ask is a live PostgreSQL measurement of the 25P02 rule and a MongoDB standalone run. A review follow-up usually defaults to p3, but this one verifies a p1 data-integrity fix on the production database, and the released docs will state the rule: p2. Parked until #34412 lands.

  3. added
    domain:server
    pm:blocked
    priority:p2
    on Nov 17, 2026
  4. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

    One more item for this card, from L2 record 6935186906 on PR #34503 (nit N5), passed on by area o2-E:

    • N5: on a MongoDB replica set, a before* hook swallows a failing ctx.api write. Record what the outer write and the side write end as, beside the standalone cell, and make the docs say what was measured.
  5. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: unlock → pm:queue · 2026-11-17T05:47Z

    ⛔ Not a claim.

    Blocker #34412 closed today at 04:57Z. Back to the queue at its grade (p2).

  6. added
    pm:queue
    and removed
    pm:blocked
    on Nov 17, 2026
  7. objectstack-fleet commented on Nov 18, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Regraded p2 → p3 by the maintainer's grading principle of 2026-11-18; the maintainer approved this batch in triage's session (「同意降到 p3」). Downgraded only: the card stays open.

    The principle, in order:

    1. What a new user or a prospect meets first (looks and the main flow), the cloud core (Turso, hosted sign-up and onboarding, hosted install and upgrade, plans) and a developer's first contact come first.
    2. Data loss or a permission breach in normal use stays first.
    3. Details and rare configurations are improved over time.
    4. Internal items are frozen.
    5. New features default to p2, p3 when out of focus.

    Why this card: internal: review follow-ups of PR #34503 with no named user effect (frozen).

  8. added and removed
    priority:p2
    on Nov 18, 2026
  9. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:data · domain:server · Task · p2 · pm:queue · size S; rationale: on PostgreSQL, a statement inside a before-hook that fails and is swallowed (or logged or retried by onError) has no savepoint, so the whole unit enters 25P02 and the outer write is refused. The refusal is loud, but the rule is undocumented and the live measurement is owed. p3 → p2, the filer's suggested grade. Audit restatement, tier 3. Recorded 2026-11-27T12:21Z.

  10. added
    priority:p2
    and removed on Nov 27, 2026
  11. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Claim: PM loop round 1 · 2026-11-27T14:14Z
    Session: session_01L6bhgV6i8jfWwSXjpWJrjA
    Thread session: session_01L6bhgWfqiK4KtAFo9PN4Xr
    Account: os-sales
    Branch: claude/project-thread-izae00 (from main)
    Domain: domain:server
    Seat: repo:objectstack#2
    Area: s2-data
    File surface: the before* hook transaction wording in hooks.mdx and the matching changeset text; a measurement test or script beside the existing driver tests only if it can run in CI, otherwise the measurement is recorded on this card.
    Container & model: S, mode:thread, model: opus, effort: medium (reason: a live-database measurement that rewrites documented behaviour to what was measured; dispatch-gates --tier answers no path-derived mandate)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — review follow-ups of PR #34503
    Thread-read: none
    Premise: unmeasured — the card's 25P02 reading is from the docs; the thread measures S1 (PostgreSQL: swallowed failure, onError log, onError retry), N3 (MongoDB standalone) and N5 (MongoDB replica set) and reports any cell it cannot start as not measured, never guessed
    Serial constraints cleared: Blocked-by #34412 — closed 2026-11-17

    The PR says Fixes #34563.

  12. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 27, 2026
  13. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgWfqiK4KtAFo9PN4Xr

    Measured: S1, N3 and N5 · 2026-11-27T14:24Z

    PR: #37990 (draft, docs only, head 5c0e0ef6). Tree origin/main 57ab087. Probe: a real ObjectQL over a real SqlDriver / MongoDBDriver, one metadata-bound beforeInsert hook (bindHooksToEngine) on zz_case whose ctx.api insert into zz_note hits a unique constraint on a pre-seeded value. Servers: PostgreSQL 16.15, MongoDB 8.0.38 standalone, MongoDB 8.0.38 single-node replica set; SQLite as the contrast.

    Path SQLite PostgreSQL (S1) MongoDB replica set (N5) MongoDB standalone (N3)
    control: hook writes a valid row stored stored stored refused, nothing stored
    hook body catches the failure stored, side write absent refused 25P02 refused 251 refused
    onError: 'log' stored refused 25P02 refused 251 refused
    retryPolicy {maxRetries: 2}, 2nd attempt valid stored, retry row kept refused; both retries answered 25P02 refused; both retries answered 251 refused
    retryPolicy + onError: 'log' stored refused 25P02 refused 251 refused
    • S1 as expected: refused with 25P02 on all three paths, nothing stored (no row, no side write). The outer error is the raw driver error (code: '25P02', no status); the hook itself saw DUPLICATE_RECORD 409 (SQLSTATE 23505).
    • N5: a replica set behaves like PostgreSQL: MongoDB code 251 "Transaction with { txnNumber: 2 } has been aborted.", nothing stored.
    • N3: on a standalone server every write on an object with such a hook is refused, even when nothing fails: "This MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string." Re-run with retryWrites=false: the same message on all five paths. A write to an object with no such hook succeeds on the same server.

    hooks.mdx and the released a8e09bb entry in packages/objectql/CHANGELOG.md now say this (#37990). Still saying "read in code, not measured": skills/objectstack-data/references/data-hooks.md:60 and eval hooks-security-seeds-datasources.json:317 (Tier H, left for its own card).

  14. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgWfqiK4KtAFo9PN4Xr

    Addendum to the measurement above · 2026-11-27T14:27Z

    The N3 line "A write to an object with no such hook succeeds on the same server", which hooks.mdx in #37990 states as "Writes to an object that opens no unit are unaffected", is measured through the engine, not only with mongosh. Each probe run seeds zz_note with engine.insert('zz_note', { code: 'dup' }) on the same ObjectQL over the same standalone MongoDBDriver. zz_note carries no hook, so that write opens no unit. The seed succeeded in all 10 standalone runs: 5 paths with the default connection string and 5 with retryWrites=false. Every one of those runs reads back noteRows: ["dup"], while the hooked zz_case write in the same run was refused.

  15. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Landed · 2026-11-27T15:43Z

    PR #37990 merged at 2026-11-27T15:42Z and closed this card: hooks.mdx and the objectql CHANGELOG entry now state what was measured on PostgreSQL 16, a MongoDB 8.0 replica set and a standalone server (S1, N3, N5), not what was read in code. pm:dispatched is cleared. Follow-ups: #37991 (the standalone refusal names a fix that does not work, and nothing says so at boot), #37992 (the objectstack-data skill still says "not measured", Tier H).

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

Metadata

Metadata

Assignees

Labels

area:datadocumentationdomain:serverpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions