Skip to content

PRD 4173 M4, part 1: saved work of the interrupted run - #12

Merged
MirceaTufanDev merged 20 commits into
prd/ws-2from
4173-m4-part1
Nov 12, 2026
Merged

MirceaTufanDev merged 20 commits into
prd/ws-2from
4173-m4-part1

Conversation

@MirceaTufanDev

Copy link
Copy Markdown
Collaborator

Saves the committed work of the interrupted M4 run on the integration branch, so the next run continues from it.

  • m1 to m3 of the M4 plan, complete and reviewed in-run.
  • m4, units 1 and 2 (owner-scoped issue source, write guard, linked MR lane, caller routing).

M4 is not finished: the rest of m4 and m5 to m7 follow in a new run.

Merge with "Create a merge commit".

🤖 Generated with Claude Code

uzi-agent and others added 20 commits November 11, 2026 18:18
Issue identity (issue_key), the author mapping, the never-enabled
marker, the link and first-enable lock, the resolver binding, the
renamed eligibility tag, and the two owner answers (never-enabled gate,
issue key in agent references).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… guard (PRD 4173 M4)

Migration 00425 adds repos.awaiting_first_enable (cleared by a trigger
on the first enable, never set back), the repo link columns with an
all-or-none check, issues.issue_key tied to forge_issue_iid, and a guard
trigger (SQLSTATE UZ413) refusing issue numbers on a repo that was never
enabled. New owner-scoped link queries; repo-row queries carry the link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…4173 M4 review)

SetRepoIssueTrackerLink binds both the repo and the issue tracker
connection to the same owner. The issue-number guard raises when a named
column is missing instead of passing. The migration sets a lock timeout,
bounds the project short name so every issue key fits, and the tests pin
continued_issue_iid, the UPDATE path and the read-side owner binding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (PRD 4173)

forgetest.Recorder logs every forge call with stable arguments; golden
files capture the calls of sync, MR watches, PRD link patches, board
columns, card moves, run creation, schedules, enable, the poller tick,
the board handlers and the worker issue routes on unchanged code, so the
M4 changes must leave an unlinked repo's forge calls identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… (PRD 4173 M4)

The poller golden now seeds a board-lane MR run, a board-free MR run, a
merged MR with a PRD link and an autopilot trigger, so dropping any of
those lanes from a tick fails it. The handler golden adds a card move and
a new issue. The recorder tells nil from empty and never panics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s finding mark (PRD 4173 M4)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es, DL-6 aligned with upstream M3

Two M4 acceptance clauses (issue tracker text bounded like forge text; a
reconnect cannot change the account of a linked connection), the
reconnect rule, the moved-issue test window and the link-message limit
recorded before code; DL-6 names the upstream driver helpers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tag; routes and wiring (PRD 4173 M4)

LinkRepo checks, by reading only, that the token's account is the
connection's, the project and tag are listed, and the tag can be applied
by the account and by someone else; it then links under the repo row
lock, bound to that account. A reconnect cannot change the account of a
linked connection, and a linked connection cannot be deleted. Minimal
cookie-only routes for connections, projects, tags and the link;
issuetrackersvc is wired into the server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…usted

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…unt change; clean names from YouTrack (PRD 4173 M4 review)

The reconnect rule holds in the statement, without transaction wiring
and across a first-connect race. A test pins that a link waits for a
reconnect holding the connection row. Tag, owner, group and project
names lose invisible and control characters before they reach the
client. 503 without the service is tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed repo (PRD 4173 M4, D13)

Board seed and refresh, issue-bearing run creation, schedules, issue
creation and filing, proposals, self-improve and GitHub project setup
refuse a repo that was never enabled before any forge call, with 409.
The database guard's UZ413 maps to the same error instead of 500.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ct created (PRD 4173 M4 review)

The no-row path inserts with ON CONFLICT DO NOTHING and otherwise goes
back through the locked check, so a connect racing another connect and a
link cannot change a linked connection's account. Ids from YouTrack are
cleaned like names before they reach the client.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…4173 M4 review)

Clone and add-repo schedules, prompt fires, every run kind, column setup
and worker proposals refuse a never-enabled repo with 409 before any
forge call; Slack says to enable the repo first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed MR lane (PRD 4173 M4)

IssueTrackerForRepo binds a linked repo to its own issue tracker
connection and project from the owner-scoped repo row and fails closed
otherwise; CodeHostForRepo never reads the link. On a linked repo every
issue write is refused before any request (writes arrive in M5), a moved
issue's not-found is a permanent skip, MR state is watched in the
board-free lane, and autopilot and GitHub project sync are skipped. The
poller keeps a linked repo's code-host steps when its issue side fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sing one, never nil (PRD 4173 M4 review)

The issue-side steps now fail per candidate and the code-host steps keep
running. The sync dispatch is derived from the resolved issue tracker,
a filed finding group is released when issue writes are not offered, and
the collision test adds one owner with two forge connections.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…utes through the issue source (PRD 4173 M4)

A linked repo's issue reads and writes go through IssueTrackerForRepo;
an unlinked repo keeps its own forge driver, byte for byte. A missing
wire fails closed. A skippable issue write clears the card-move marker
instead of retrying, so a moved issue's run still completes on the code
host. The worker reads a linked issue only through the API (S5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 409; shared write sentinel (PRD 4173 M4 review)

The rework test rig gets its real queries, so the handler package no
longer panics. Linked-repo filing paths answer 409 and release their
claim, the linked-tracker check is a marker method, and a proposal
confirm on a linked repo maps to the same not-offered 409.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MirceaTufanDev
MirceaTufanDev merged commit bb0ecde into prd/ws-2 Nov 12, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant