fix(scm): port upstream source-control session rework as one unit (fixes #19) - #30
Merged
Conversation
PYDuquesnoy
force-pushed
the
fix/debug-http-executor
branch
from
August 7, 2026 13:39
5921915 to
77ad87a
Compare
#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
force-pushed
the
fix/scm-session-rework
branch
from
August 7, 2026 13:42
fdf1a2a to
f8b81db
Compare
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.
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:
UserActiononly offers the dialog; withoutAfterUserActionthe checkout evaporated with the HTTP-scoped session and the follow-up write failedERROR #5865.IsEditable()unguarded — on providerless instances the generated<METHOD DOES NOT EXIST>fell through parsing aseditable:falsefor perfectly editable docs.Plus: SCM probe now runs over
execute_via_generator(no docker),CheckoutCachestops the re-elicit-on-every-edit loop,IRIS_SCM_ALLOW_CHECKINgates check-ins, and the executor's$ZERRORresidue no longer corrupts valid output.Fork adaptations: no policy subsystem,
Optionnamespace viaresolve_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