Repository navigation
feat: add break-on-record-write triage - #10
Conversation
|
Reviewed the full diff against Verified locally: 594 pass / 0 fail, typecheck clean, build 1.36 MB, tree clean after build. CI is green on the PR. Design check: the wire forces this approachWorth recording so nobody "simplifies" it later.
Should fix1. A mid-capture detach still reports
|
|
Addressed in
Validation:
The redacted live evidence and checklist are updated in the branch. |
SShadowS
left a comment
There was a problem hiding this comment.
Verified afa6ca5 in an isolated worktree: 598 pass / 0 fail, typecheck clean, build 1.36 MB.
Probed the detach split directly. An external detach retains its exact groups and reports complete: false, stopReason: "sessionDetached", and the early-window warning; a detach caused by finish's own release barrier stays a deliberate finished window; the happy path is unchanged. Statement shapes now report multipleWriteCandidates for two writes in one span, and dotted chains, indexed receivers, and function-return receivers all fail closed. Making an unsupported receiver win over a valid match in the same span is a tightening beyond what I asked for, and it is the right call.
Thanks for taking the conditional upsert to the live fixture. An individual write-call span per operation is exactly the fact that needed to be evidence rather than assumption.
One non-blocking note for a later doc pass. Your evidence records that SaaS Background completion emits OnDetachedFromConnection before finish, so a Background workload that ends normally will always report complete: false. That is the correct conservative result: OnDetachedFromConnection(bool terminateSession) only maps to a DAP Terminated event in the official adapter, so the wire carries no "the workload finished" semantics and a clean end cannot be distinguished from an early death. Worth one line in the skill so agents do not read complete: false on every Background capture as a malfunction. Related nit: nextSteps for that case says "Review unresolved groups and warnings" even when there are zero unresolved groups.
Still open from the earlier review, all filed as notes rather than asks: the per-break re-lex cost in explicitWithContext, an all-zero span still reporting line: 1, and no on-prem validation.
Summary
This PR implements roadmap item 7, Break-on-record-write triage.
bcdev_record_writes_start,bcdev_record_writes_status, andbcdev_record_writes_finish.changesDeployed: true.maxObservedWritesand releases the workload when the cap is reached.Failure and lifecycle behavior
complete: trueapplies only to the observed writes in one attached-session capture window; it is not a tenant-wide claim.with <record> docontexts resolve the actual receiver, including nested blocks.Insert,Modify,Delete, andDeleteAllcalls are classified.multipleWriteCandidatesreason.ReleaseConnectionbarrier, drains in-flight asynchronous Break callbacks, and avoids dropping or double-releasing the paused workload.Compatibility
bcdev_debug_attach { breakOnRecordWrite: ... }behavior remains available.Validation
bun test: 598 passed, 0 failedbun run typecheck: passedbun run build: passedValidated against a disposable Business Central SaaS Sandbox fixture:
RecordRef, deployed-source classification, and full statement spans were exercised.with Targetinside a different table's method classifiedTarget, not the hostRec; parenthesis-freeInsert,Modify,Delete, andDeleteAllall passed with zero unresolved writes.if not Record.Insert(false) then Record.Modify(true)produced individual write-call spans; all 5 observed writes classified exactly with 0 unresolved.complete: false,stopReason: "sessionDetached", and a warning.Redacted live evidence is recorded in
scripts/e2e-break-on-record-write-triage-2026-07-25.md.No Production or on-premises live calls were made.