Skip to content

fix(scm): port upstream source-control session rework as one unit (fixes #19) - #30

Merged
PYDuquesnoy merged 2 commits into
masterfrom
fix/scm-session-rework
Aug 7, 2026
Merged

fix(scm): port upstream source-control session rework as one unit (fixes #19)#30
PYDuquesnoy merged 2 commits into
masterfrom
fix/scm-session-rework

Conversation

@PYDuquesnoy

Copy link
Copy Markdown
Contributor

Fixes #19 — the last and largest port from the upstream audit. Upstream rebuilt source-control across eleven commits; this lands their final state in one unit (replaying the steps would re-import two changes upstream itself reverted). Full breakdown in the commit message.

The two acute bugs this kills:

  1. Approved checkouts were never committedUserAction only offers the dialog; without AfterUserAction the checkout evaporated with the HTTP-scoped session and the follow-up write failed ERROR #5865.
  2. IsEditable() unguarded — on providerless instances the generated <METHOD DOES NOT EXIST> fell through parsing as editable:false for perfectly editable docs.

Plus: SCM probe now runs over execute_via_generator (no docker), CheckoutCache stops the re-elicit-on-every-edit loop, IRIS_SCM_ALLOW_CHECKIN gates check-ins, and the executor's $ZERROR residue no longer corrupts valid output.

Fork adaptations: no policy subsystem, Option namespace via resolve_namespace (#15), failures through the #2 envelope. Implementation by a delegated port agent against a written adaptation contract; independently re-verified: 260 lib tests, suites 9/9, live e2e 10/10, manual no-SCM probes (status/put/compile/delete) all clean.

Stacked on #29 (→ #28#27#26#25#16 → master). Closes out the fix-PR series from the divergence audit — every issue #17#23 now has a verified PR.

🤖 Generated with Claude Code

@PYDuquesnoy
PYDuquesnoy force-pushed the fix/debug-http-executor branch from 5921915 to 77ad87a Compare August 7, 2026 13:39
PYDuquesnoy and others added 2 commits August 7, 2026 15:42
 #19)

Our scm.rs was verbatim pre-rework (upstream PR #62 + ten follow-ups); the
doc.rs pre-write probe still used the %GetImplementationObject pattern
upstream deleted, with C-style \" escaping (the #6 bug class) over docker
exec. Port of the FINAL upstream state, replayed as one unit because two
intermediate steps (8444bab GetStatus one-liner, aa937dd None-on-no-signal)
were superseded/reverted upstream:

- scm.rs: SourceControlCreate session init, SCMSTATUS sentinel probe,
  derive_scm_status/parse_checked_out_by, typed ScmAction + %-prefixed menu
  ids, IRIS_SCM_ALLOW_CHECKIN gate (CheckIn filtered + blocked by default),
  AfterUserAction finalization, elicitation resume with cache invalidation.
  Acute bug fixed: unguarded IsEditable() returned editable:false for
  perfectly editable docs on providerless instances.
- doc.rs: %GetImplementationObject probe -> write_with_scm (CheckoutCache
  fast path, MenuItems probe ending in PROCEED sentinel, via
  execute_via_generator — no docker). Acute bug fixed: an approved checkout
  was never committed (UserAction offers the dialog; only AfterUserAction
  persists it — the write then failed ERROR #5865 with the session gone).
- elicitation.rs: CheckoutCache (60s TTL, ns+doc key) so chained writes to
  a doc we just checked out skip the re-probe/re-elicit loop.
- connection.rs: snapshot $ZERROR before Close/Use can clobber it; surface
  it only when the body produced no output — a residual <ENDOFFILE> from an
  SCM provider's internal Read no longer corrupts valid output.

Adaptations for this fork: no policy subsystem (server/confirm/dispatch_gate
dropped), namespace as Option resolved via resolve_namespace (#15), genuine
failures through the #2 envelope (isError + error_code), elicitation dialogs
stay non-error. No-signal remains controlled:false/editable:true.

Verified: 260 lib tests (~70 ported SCM tests), suites 9/9, live e2e 10/10,
and manual probes on the (SCM-less) dev IRIS: status -> uncontrolled/
editable with no isError; put/compile/re-put/delete all green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@PYDuquesnoy
PYDuquesnoy force-pushed the fix/scm-session-rework branch from fdf1a2a to f8b81db Compare August 7, 2026 13:42
@PYDuquesnoy
PYDuquesnoy changed the base branch from fix/debug-http-executor to master August 7, 2026 13:42
@PYDuquesnoy
PYDuquesnoy merged commit 3c6daf4 into master Aug 7, 2026
10 checks passed
@PYDuquesnoy
PYDuquesnoy deleted the fix/scm-session-rework branch August 7, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant