Repository navigation
feat(writeback): manual, batch and policy-driven merge review (#997) - #1323
Merged
Merged
Conversation
The tenant surface for Salesforce writeback, and the two review modes it
lacked.
- /{org}/{ds}/writeback: previews by state with master, victims, master field
diffs, score, related-count availability, the apply outcome, the undo
(conflicts, and that reparented records are not moved back) and history.
Stewards approve/reject singly or in batches; admins apply and undo.
- POST …/merge-previews/decide: up to 100 items, each through exactly the
single-item checks (fingerprint seen, proposal still validates, policy
revision and connection live), each reporting its own status.
- Score evidence: a preview's score is weakest-link — for each victim, its
strongest active match_scores edge to another member of the same group,
then the minimum; NULL when any victim has none (a nullable column).
- Auto-approval: PUT/GET …/writeback/auto-approval, an append-only rule per
(connection, object) with min_score and max_members, applied only as a
preview is published and attributed to policy:<revision>. Changing a rule
never rewrites a decision; a NULL score is never auto-approved.
- The preview detail carries the apply's status and detail.
- BFF routes, query hooks, mock-erserver routes, a functional spec, the axe
gate entry, and the desktop baselines the new nav item moves.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
The marketing preview was removed because this PR is closed or merged. |
athvin
temporarily deployed
to
marketing-preview
November 27, 2026 08:16 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #997
The
/{org}/{ds}/writebackreview surface (BFF routes, hooks, page, nav), batch decisions, weakest-link score evidence on previews, append-only auto-approval rules applied at publish time, and the apply outcome on the preview detail.connectors.md§4.3.4.#997: review merge proposals manually, in batches and by policy — all three ending in the same guarded apply (#995) and undo (#996).
Proof
pg_merge_preview_dag(real DuckLake pipeline): the crm pair's group carries a score from the match run's edges, and a rule set before generation approved it as it was published,decided_by = policy:<rule>.pg_merge_preview_api: batch reject — the valid item decided, a stale fingerprint refused, an unknown id 404, each reported separately; viewer 403; a bad decision 422; rules admin-only and range-checked.group_scoreunit test: the weakest victim's strongest in-group edge; an edge leaving the group ignored; a victim with no edge → no score.writeback.spec.ts(three device projects): viewer sees scores and "no evidence" with no actions; a steward batch-approves two and sees2 decided, 0 refused; an admin opens an auto-approved, applied preview and requests its undo. Axe: writeback has no serious violations.make checkexit 0; full Postgres suite 160 passed.make frontend: vitest 1139 passed; Playwright 1106 passed, 1 failed —account.spec.ts"the new-source wizard maps onto the account canonical attributes" on mobile-chrome only (a wizard select not yet hydrated with its auto-mapped value). This diff touches neither the source wizard nor mobile navigation; CI's run is the arbiter.mcr.microsoft.com/playwright:v1.63.0-jammy(update-baselines.sh): the eleven pages that show the rail. Three marketing baselines the=allrewrite also touched were reverted as render noise.Risk & rollback
Auto-approval is opt-in per (connection, object) and never acts without score evidence; nothing writes to Salesforce until an admin applies.
git revert <merge-sha>.Post-merge ledger
Closed by: agent · session
Claude Code:24d16c2e-fec6-49d8-9797-060338df4848onbrians-MacBook-Pro· 2026-11-27T08:34:05Zmainis green with this change on it — the merge SHA, and the runthat proves it. A later head SHA with this commit as an ancestor counts;
a cancelled run with zero jobs does not: — 6798182, rust 45964417084 + frontend 45964417233 success
imagesbuilt, or correctly never ran because nothing that goes intoan image changed: — success, run 45964417300
deployconverged — proved by a line the running process emitted, notby the image digest and not by the workflow conclusion: — run 45964923860 success; the live process serves the new API (
https://dupezero.com/api/openapilistswriteback/auto-approval), and the running er-web pod (web-api-blue, created 08:21Z) contains.next/server/app/(tenant)/[org]/[ds]/writeback/page.jsand themerge-previews/decideBFF routedeploy,drift,kind's nightly leg) is green, or knowingly red for a reason that is notthis change: — infra, devcontainer, marketing preview all success on 6798182
Donethrough the automation rather than byhand, and the issue closed: — E9: Add manual, batch and policy-driven writeback review #997 CLOSED by feat(writeback): manual, batch and policy-driven merge review (#997) #1323 via automation
(a skill, a reference, memory) — or nothing new was learned: — the local Playwright failure in account.spec (mobile-chrome) did not reproduce in CI, consistent with the known hydration race; unauthenticated probes cannot tell a real page from a missing one here (both 307/401), so the running pod's build is the evidence
Specific to this change
merge_previews.scoreand reconcilesmerge_auto_approvals— the new er-server serves (boot reconcile refuses to start on a failed apply), run 45964923860Context — plan, discoveries, measurements, files
Plan
Discoveries
connection_id,policy_revision,at, …) as fields no entity declares; each is now explained with its source.Measurements
Files
🤖 Generated with Claude Code