You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Falsifier: F12.2's two tests/test_submission_default.py nodes (the credential node here; the server node lands with T014); the new tests/test_submission_port.py.
session_pr.py, NEW names only, in one delimited block after the existing classes (T012 edits this file next): SUBMISSION_OPERATIONS = ("submit",), the @runtime_checkableSubmissionPort with one operation submit(branch) -> Submission, the frozen Submission (remote, ref, url redacted, branch, commit), SubmissionError with its two named failures NoSubmissionTarget and SubmissionRefused, and LocalGitSubmissions(checkout_root), constructed as GhPullRequests is. PullRequestPort, PORT_OPERATIONS, GhPullRequests and FakePullRequests are untouched; LocalGitSubmissions is not a PullRequestPort (no push, open_or_update or find_open).
submit returns only on success; every failure raises, redacted.
NoSubmissionTarget: no remote; several remotes and none named origin (CF-7), naming them.
SubmissionRefused: main (R2Q5 (a)); a name that is not a branch name, or a branch that is not there; a remote with no URL; several push URLs (a URL holding a newline counts as two); a push URL that is empty or has surrounding whitespace or a control character (refused, never trimmed); a checkout whose own config names a program git runs; a remote that names a command (<name>::), or a <scheme>:// git does not carry itself, which would run git-remote-<scheme>; a remote named like a git option (--force); a file:// URL holding a ? or #, which git reads as part of the path; a directory that is not a repository root; a rejected push; a failed transport.
A refusal raised after the remote URL is read does not chain its cause, so a logged traceback carries only the scrubbed text.
Which remote: the one named origin, else the sole remote of any name (ADV-26).
Which commit: the branch tip, read once and pushed by its sha (<sha>:refs/heads/<branch>), so Submission.commit is what was sent. Never --force, never --set-upstream: the checkout's configuration is not written.
The checkout is held open: resolved once, opened without following a link, and git is pointed at the descriptor; a linked worktree's git and common directories are held by descriptor too, for the whole submission (local_git_adapter.metadata_held_open). A directory inside a repository is refused, as the runtime refuses one.
Credentials (12.1a; ADV-09): a credential-bearing remote is PUSHED. submission_push.redact_destination is all a report or a message shows of the URL: userinfo and every query and fragment value are replaced, and the scheme, host, port and path stay (a plain ssh login name, [A-Za-z0-9._-]+, stays too). Text the module did not write (git's stderr, a runtime refusal) is scrubbed of the URL's literal secrets, because git echoes a query string verbatim, and then passed through the package's credential redactor. Of a failed push's stderr, only git's fatal: and error: lines and the adapter's timeout line are kept: under the user's own GIT_TRACE_CURL=1 or GIT_CURL_VERBOSE=1 the rest is curl's trace of every request header, an http.extraheader secret among them (lane 3's review R1).
The push core, factored (OQ-12-12): submission_push.py carries no push of its own. It builds a PushPlan and hands it to repository_act._push_to_remote_with, which the runtime's push_to_remote also uses. So the repository-local command-config refusal (_EXECUTED_LOCAL_KEYS, _refuse_repository_local_command_config), -c protocol.ext.allow=never, the pinned --receive-pack with the destination's hooks off, the descriptor-bound local destination, the bounded, non-interactive push, and a push that sends its refspec and nothing else hold for both. In repository_act.py:
the runtime's own checks (map of record, push URL count, HEAD's branch, service-root containment) moved, line for line, into _mapped_push_plan, which returns the plan;
the send stays named _push_to_remote_with, because tests_runtime/test_repository_act.py:685 and tests_runtime/test_local_git_adapter.py:3058 read its source; it now takes the plan;
push_to_remote names a failed push exactly as before;
the core passes --no-follow-tags and --no-recurse-submodules. MEASURED on git 2.43.0, exit 0 both times: the checkout's push.followTags=true also sent an annotated tag the refspec never named, and push.recurseSubmodules=only sent nothing, so a Submission named a branch that never left. The options outrank both keys and submodule.recurse (measured: with submodule.recurse=true the push no longer tries the submodule's remote). The runtime's push_to_remote goes through the same core and gains the same guard;
_bound_local_destination gains contained=True. Only the submission passes False: a checkout has no service root, and a bare remote beside it (F12.2's own layout, $W/plain and $W/remote) is the ordinary local remote. The runtime's plan always asks it (a test pins contained=True on the runtime's plan).
The falsifier, run (red first)
Before the implementation, at this branch's tests over main's src:
FAILED tests/test_submission_default.py::test_a_credential_in_the_remote_url_never_reaches_the_report - AttributeError: module 'opendox.session_pr' has no attribute 'LocalGitSubmissions'
1 failed in 0.60s
ERROR tests/test_submission_port.py
E ImportError: cannot import name 'submission_push' from 'opendox'
1 error in 0.23s
After, at the final head, with gh hidden from PATH (CF-8) and CI=true:
The credential node pushes for real, over loopback and never the network: the remote is git http-backend behind a stdlib server on 127.0.0.1, and its URL carries a userinfo secret, a token= query value and a query value under a name no pattern knows. The branch arrives and the server saw the query, so the remote is measured as PUSHED. The node then drives a rejected push (non-fast-forward), two push URLs, and the same URL with nothing listening. None of the three refusals' messages or formatted tracebacks, nor Submission.url or the report's repr, carries any of the three secrets, and the report keeps 127.0.0.1:<port> and /remote.git.
Mutants: 42, all killed
Each mutant replaces one exact string, runs the named nodes, and restores the file byte for byte.
M01 main is not refused: KILLED
M02 no remote falls through: KILLED
M03 several, none origin: take the first: KILLED
M04 origin not preferred: KILLED
M05 a sole remote is not taken: KILLED
M06 no ref-name check: KILLED
M07 a missing branch is not refused: KILLED
M08 a URL-less remote is not refused: KILLED
M09 several push URLs are not refused: KILLED
M10 the command-config refusal is dropped: KILLED
M11 the command-transport refusal is dropped: KILLED
M12 the submission asks the service-root containment: KILLED
M13 the root check is dropped: KILLED
M14 userinfo is not redacted: KILLED
M15 query values are not redacted: KILLED
M16 held secrets are not scrubbed: KILLED
M17 foreign text is not scrubbed at all: KILLED
M18 the report shows the raw URL: KILLED
M24 an unparseable URL is not refused before the push: KILLED
M25 a linked worktree's metadata is not held: KILLED
M26 a whitespace-, control- or empty push URL is not refused: KILLED
M27 the push URL is read trimmed: KILLED
M28 an empty line of get-url is dropped: KILLED
M29 the push refusal chains git's own text: KILLED
M30 the ssh login rule reads only a literal colon: KILLED
M31 a scheme git does not carry is not refused: KILLED
M32 a remote named like an option is not refused: KILLED
M33 the core follows the checkout's push.followTags: KILLED
M34 the core follows the checkout's push.recurseSubmodules: KILLED
M35 a file URL with a query or fragment is not refused: KILLED
M36 a file URL's fragment is not refused: KILLED
M37 a failed push's refusal carries git's whole stderr: KILLED
M38 the kept-lines pattern keeps every line: KILLED
M39 (R1 X5) unheld metadata escapes as a bare RuntimeError: KILLED
M40 (R1 X4) no length cap in redact_destination: KILLED
M41 (R1 X6) the transport match folds case: KILLED
M42 the module spells the HTTP client's auth header: KILLED
M19 the runtime's bind skips containment by default: KILLED
M20 the runtime's plan skips containment: KILLED
M21 the core ignores contained=False: KILLED
M22 the neutral class claims a platform operation: KILLED
M23 NoSubmissionTarget is a SubmissionRefused: KILLED
survivors: 0
The whole suite, as CI runs it
CI's validate job at the final head eb4976f6 (run 37515118652), with T010's sandbox live (OPENDOX_TEST_SANDBOX_REQUIRED=1), read 5521 passed, 11 skipped and triple: selected=5532 passed=5521 skipped=11 failures=0 errors=0. main is merged in twice: 34c2064 (T010) at 5e3ca9c, which changed only .github/workflows/validate.yml, and 84f8ed8 (T025) at b954631, which changed four web and test files outside T011's Files. SonarCloud at eb4976f6: quality gate OK, 0 open issues.
At the first head 184b8444, CI's validate job (run 37453468885) read 5502 passed, 11 skipped and triple: selected=5513 passed=5502 skipped=11 failures=0 errors=0, the same as a local replica of the job (.[runtime,test] under the constraints file, PostgreSQL 16, CI=true). main's tree read 5458 passed and 11 skipped in that replica. This change adds cases and no skip, so EXPECT_SKIPPED stays 11, and the floors are not moved here (T017 re-pins phase 4's floors). The runtime's push suites (tests_runtime/test_repository_act.py, tests_runtime/test_local_git_adapter.py) with the new files read 277 passed after the factoring.
openXdox-code's protected pin, unchanged and green
tests/test_session_snapshot.py:893-916 (test_the_loopback_serve_declares_the_pull_request_port) is in openXdox-code's declared exclusion (doc_health), so it was run composed: openXdox-code main56e1c23, openxFactory's scripts/ on PYTHONPATH, and opendox installed from this branch.
tests/test_session_snapshot.py::test_the_loopback_serve_declares_the_pull_request_port PASSED
tests/test_session_snapshot.py: 23 passed
sha256 of lines 893-916 at openXdox-code main and in the run: 8e1d468a…f8e085 (identical)
Files changed
src/opendox/session_pr.py: the new names, in one block; one docstring paragraph; __all__.
src/opendox/submission_push.py (new): the submission's git half and redact_destination.
src/opendox/runtime/repository_act.py: PushPlan, _mapped_push_plan, _push_to_remote_with(git, plan) with --no-follow-tags and --no-recurse-submodules, push_to_remote's failure naming, _bound_local_destination(contained=…).
tests/test_submission_default.py (new): F12.2's credential node, and the fixtures the port tests import.
tests/test_submission_port.py (new): every refusal, the redaction table, a linked worktree and its unheld metadata, the checkout's push settings, a failed push under GIT_TRACE_CURL, the length cap, and the factoring.
What is NOT done here
The bindings submission_factory and _submission_port, and F12.2's server node test_server_unset_submission_factory_binds_the_neutral_default (T014). That node goes beside the credential node and uses the same checkout fixture.
The submit verb, route and view control (T015), and with them the "verb's printed report" half of the credential assertion. What submit will print is the Submission, which this node already asserts on.
No governed host contributes a SubmissionPort in release 2 (R2Q2 (a), R2Q3 (a)).
The CI floors (T017) and the README (T018).
Review R1 (lane 3), folded
Lane 3's read-only review R1 at 2ad92ae9 was a GO (opensoft/openXfactory#656 comment 6022010349): 0 BLOCKER, 0 MAJOR, 2 MINOR, 2 NIT. All four are folded into d186f6b, on top of the merge of main.
MINOR, the signed-push premise: corrected, with no code change (the accepted limit above, and the correction on r4197922524).
MINOR, a failed push's refusal embedded git's whole stderr: fixed; only fatal: and error: lines are kept. test_a_failed_push_keeps_only_git_s_fatal_and_error_lines reproduces R1's measurement: http.extraheader = X-Api-Key: <secret>, GIT_TRACE_CURL=1, and a loopback server answering 403. It was red first, with the secret in the message, and is green now; mutants M37 and M38 are killed.
NIT, three tests for R1's surviving mutants: X5, a worktree whose metadata cannot be held (M39); X4, the length cap (M40); X6, HTTPS:// with a planted git-remote-HTTPS (M41). For X5, MEASURED on git 2.43.0: git hands back a worktree's canonical directories even through a symlinked .git file or commondir, so the test supplies the no-follow open's ELOOP for the worktree's metadata. For X6, MEASURED: plain git push HTTPS://… ran the planted helper.
NIT, the cites: written as openDox-code#92 comments.
CI's validate FAILED at d186f6ba (run 37507020596): 1 failed, 5520 passed, 11 skipped. The failure was tests/test_provider_boundary.py::test_the_generic_http_client_has_exactly_its_named_holders, with ['submission_push.py: Authorization']: the fold's new comment spelled the HTTP client's auth header by name, and that test holds the name to its declared holders. Fixed in eb4976f, comment only. The test was red locally at d186f6ba and is green now, and mutant M42 restores the word and is killed. The same commit clears SonarCloud's two python:S5778 at d186f6ba (tests/test_submission_port.py:314 and :401): each LocalGitSubmissions is constructed before its pytest.raises block.
Copilot
Eleven rounds, every thread answered and resolved:
at 184b8444: a linked worktree's metadata held open (r4194480639); the push URL read exactly, whitespace refused (r4194480699). Both fixed in c0f6c3e.
at c0f6c3e0: a newline-bearing URL no longer normalized (r4194631880), fixed in b3817d8; the network-destination config race (r4194631803), an accepted limit, below.
at b3817d8c: no refusal chains git's text into a traceback (r4195368599); an encoded ssh password redacted (r4195368695). Both fixed in bc344bb.
at bc344bbc: a <scheme>:// git does not carry is refused before its git-remote-<scheme> helper can run (r4195504431), fixed in 3ccf77b, with a remote named like a git option, found in the same pass.
at d5aeb49d: no inline finding; the overview listed one as previously missed: a malformed network URL (https://[bad/repo) is not parsed before the push starts. Ruled an accepted limit by the holder on measurement (openDox-code#92 comment 6020383463), below.
at 5e3ca9c2: a file:// URL holding ? or # was pushed to the path urlsplit leaves, while git names the literal one (r4197726596). MEASURED on git 2.43.0 with both remote.git and remote.git?x present: plain git pushed to remote.git?x, and submit pushed to remote.git and reported the ?x URL. Fixed in 2ad92ae: refused before any push, red first, with mutants M35 and M36. The runtime's push_to_remote has read such a URL the same way since § 3.6: openDox creates a repository as a first-class act, with RULING C3's conformant local-git adapter #26, and its containment judges the object it binds; it is left unchanged here and recorded for the holder.
at 2ad92ae9: the checkout's own push.gpgSign with gpg.program can run a program on a push (r4197922524). A FALSE POSITIVE, corrected by lane 3's review R1: GitRunner._argv passes -c push.gpgSign=false on every call, so submit never runs gpg.program. The reply carries the correction; the limit is the opposite one, below.
at b9546315 (the merge of main): the same switch seen from the other side, "GitRunner disables required signed pushes" (r4198546517). The declared behaviour is revised and the code is unchanged; accepted limit, below.
at d186f6ba (the R1 fold): no finding; the overview said only that the description still misstated the signed-push behaviour, which this body corrects.
at eb4976f6: no finding (review 5433258435).
Accepted limits, stated
A NETWORK destination is pushed by remote name, so git re-reads the checkout's own config at push time, after the submission judged it. This is the runtime's push core as it stands (push_to_remote has the same window). Naming the URL on the command line would put a credential-bearing URL in argv, and a -c or GIT_CONFIG_* override adds to the multi-valued url and pushurl keys rather than replacing them. A config change in that window needs a concurrent writer to the user's own .git/config, who already decides what every other git command the user runs executes; the submission runs as the user and crosses no privilege boundary. The command-config and command-transport refusals stop such a config only when it is already there, not one written during the window.
submit inherits the push core's non-interactive contract: no prompt, GIT_TERMINAL_PROMPT=0, empty askpass, and GIT_SSH_COMMAND=ssh -o BatchMode=yes -o StrictHostKeyChecking=yes, which overrides an ambient GIT_SSH_COMMAND or core.sshCommand. Credentials come from a credential helper in the global or system config, an ssh agent or default key, or .netrc.
A credential helper (or another key on the runtime's list of keys git executes) set in the checkout's OWN config is refused by name, with the remedy; one in the global config is used. The gpg keys are not on that list (below).
Neither the checkout's pre-push nor a local destination's pre-receive runs.
A local destination is pushed through its open descriptor, so no remote-tracking ref is updated for it; a network destination is pushed by remote name, as git does.
A remote defined only by a legacy .git/remotes/<name> file has no remote.<name>.url and is refused as naming no URL.
A held secret shorter than four characters (_SHORTEST_SCRUBBED) is not scrubbed out of git's text literally; the pattern redactor still runs over it. So a short query value, ticket=abc for example, survives in a SubmissionRefused when git echoes the URL. Copilot raised this as r4198584579 on T014's openDox-code#93 (submission_push.py:454), and the holder ruled it an accepted limit (openDox-code#92 comment 6023299792). A value under four characters is not a credential, and the threshold exists to prevent over-redaction.
A submission is ALWAYS UNSIGNED, so a remote that requires signed pushes refuses it (a named SubmissionRefused). GitRunner._argv passes -c push.gpgSign=false on every call (local_git_adapter.py:692-694, pinned by tests_runtime/test_local_git_adapter.py:3470-3530), so the checkout's own push.gpgSign and gpg.program never run a program here. Lane 3's review R1 measured this at 2ad92ae9: with both set and a local remote advertising signed push, plain git push ran the program, and submit did not and pushed unsigned. A caller-scoped way to keep signing is not added, because it would hand the repository's chosen program back to this process (Copilot r4197922524, a false positive, and r4198546517).
The module's "refuse before the push" does not cover a malformed NETWORK URL: _destination_as_a_local_path parses only file://, so https://[bad/repo reaches git, which refuses it at push time, before any connection (Copilot review 5429620931; ruled an accepted limit on measurement). MEASURED on git 2.43.0:
https://[bad/repo
submit raised SubmissionRefused: the push of `sess-1` to `origin` (https://[bad/repo) failed (git push exited 128: fatal: unable to access 'https://[bad/repo/': URL rejected: Bad IPv6 address); nothing is reported as submitted
traceback has cause/context: False
local refs unchanged: True; refs = ['refs/heads/main', 'refs/heads/sess-1']
https://user:<secret>@[bad/repo?token=<secret>
submit raised SubmissionRefused: the push of `sess-1` to `origin` (https://<redacted>@[bad/repo?token=<redacted>) failed (git push exited 128: fatal: unable to access 'https://[bad/repo?token=<redacted>); nothing is reported as submitted
traceback has cause/context: False
secrets in message or traceback: none
local refs unchanged: True; refs = ['refs/heads/main', 'refs/heads/sess-1']
No ref moves, and no destination is reached: curl rejects the URL as it parses it, so there is no remote to move. The scrub over-redacts the end of git's sentence after the token, and nothing leaks.
…rget (plan 038)
The neutral submit act, #1144 boxes 12.1, 12.1a, 12.2 and 12.3 (refs
opensoft/openXfactory#1144; plan 038 T011; ruled #656 6003486656 R2Q1, R2Q2,
R2Q5 and 6013547504, CF-7).
session_pr.py gains NEW names only, in one delimited block after the
existing classes: SubmissionPort (one operation, submit), Submission (remote,
ref, url redacted, branch, commit), SubmissionError with NoSubmissionTarget
and SubmissionRefused, and LocalGitSubmissions(checkout_root). PullRequestPort,
GhPullRequests and FakePullRequests are untouched.
submission_push.py is the submission's git half. It chooses origin, else the
sole remote (no remote, or several and none named origin, is
NoSubmissionTarget), refuses main, checks the branch as a ref name, requires
one push URL, and hands the push to the runtime's push core. The remote URL is
redacted everywhere: userinfo and every query and fragment value replaced,
scheme, host, port and path kept; foreign text is scrubbed of the URL's held
secrets.
repository_act.py: the push core is factored so it takes a plan. The
runtime's own checks become _mapped_push_plan (unchanged lines), the send
stays in _push_to_remote_with (two runtime tests read its source), now driven
by a PushPlan, and push_to_remote names a failed push exactly as before. The
repository-local command-config refusal is kept and applies to both callers.
_bound_local_destination gains contained=True; only the submission passes
False, because a checkout has no service root.
Tests: tests/test_submission_default.py holds F12.2's credential node, which
pushes for real to a loopback smart-HTTP remote whose URL carries a userinfo
secret and two query tokens; tests/test_submission_port.py covers every
refusal. Every remote is local or loopback, never the network.
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Implements a neutral SubmissionPort backed by a hardened local Git submission flow, factors the shared push security core into PushPlan, and adds extensive tests for submission behavior, destination selection, failure handling, and credential redaction.
Sequence diagram for the local Git submission flow
Adds a neutral, single-operation submission protocol and a local Git implementation that reports successful submissions without exposing credentials.
Defines SubmissionPort, Submission, submission exceptions, and LocalGitSubmissions while keeping the pull-request protocol separate.
Selects origin or the sole remote, validates repository roots, branch names, branch existence, destination URLs, and push URL cardinality.
Reads the branch tip once, pushes the pinned SHA without force or upstream configuration changes, and returns the destination, ref, branch, and commit.
Provides URL and foreign-error redaction covering userinfo, query and fragment values, including credentials echoed by Git.
Factors shared Git push hardening into an explicit push plan consumed by both runtime pushes and submissions.
Moves runtime validation and plan construction into _mapped_push_plan while preserving runtime destination mapping and containment checks.
Changes _push_to_remote_with to execute a PushPlan with bounded, non-interactive Git, disabled command transports/hooks, pinned receive-pack, and descriptor-bound local destinations.
Adds an opt-out of service-root containment only for user checkout submissions while retaining identity and no-follow safeguards.
Preserves runtime failure naming and redacts known destination literals from Git failure text.
src/opendox/runtime/repository_act.py
Adds comprehensive behavioral and security coverage for the submission port, real credential-bearing pushes, refusal paths, and runtime factoring.
Trigger a new review: Comment @sourcery-ai review on the pull request.
Continue discussions: Reply directly to Sourcery's review comments.
Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with @sourcery-ai issue to create an issue from it.
Generate a pull request title: Write @sourcery-ai anywhere in the pull
request title to generate a title at any time. You can also comment @sourcery-ai title on the pull request to (re-)generate the title at any time.
Generate a pull request summary: Write @sourcery-ai summary anywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment @sourcery-ai summary on the pull request to
(re-)generate the summary at any time.
Generate reviewer's guide: Comment @sourcery-ai guide on the pull
request to (re-)generate the reviewer's guide at any time.
Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore.
Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
request to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment @sourcery-ai review to trigger a new review!
Copilot, both fix-now:
- r4194480639: a linked worktree's git and common directories are now held
by descriptor for the whole submission (local_git_adapter's
metadata_held_open), after the root check, which moved ahead of it because
a bound GIT_DIR makes git read the working directory as the top level.
- r4194480699: the push URL is read exactly, git's terminating newline
aside, and one with surrounding whitespace is refused rather than trimmed
(a local path with a trailing space names another directory).
SonarCloud: the moved runtime comment no longer spells a credential-shaped
URL (secrets:S8136); the nested conditional in the query redaction is a
helper (python:S3358); the tests build the port outside pytest.raises
(python:S5778) and assert one thing per line (python:S9073).
Tests: two new cases, the whitespace refusal and the linked worktree; 27
mutants, all killed.
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… 038)
Copilot r4194631880, fix-now: the push URL's get-url lines are no longer
filtered. A URL holding a newline prints as two lines (measured on git
2.43.0), so it now counts as two destinations and is refused, instead of
being pushed to the pathname without the newline. An empty URL, or one
holding a control character, is refused with the whitespace-bearing one.
Copilot r4194631803, an accepted limit, answered on the thread: a network
destination is pushed by remote name, so git re-reads the checkout's own
config at push time, as the runtime's push already does. Changing the URL in
that window needs a concurrent writer to the user's own .git/config, who
already decides what every other git command the user runs will execute.
SonarCloud python:S3358: the held-secrets selection is an if/elif.
Tests: the newline URL, trailing and leading; 28 mutants, all killed.
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Both fix-now:
- r4195368599: no refusal raised after the remote URL is read chains its
cause any more (from None). The cause's message is git's stderr, redacted
by pattern only, so a query value under a name no pattern knows survived
in it and a logged traceback printed it. The credential node now asserts
the formatted traceback of each refusal, not only its message.
- r4195368695: an ssh userinfo is kept as a login name only when it is
plainly one ([A-Za-z0-9._-]+). A percent-encoded colon (git%3As3cret), or
any other character, makes it a credential, in the report and in the
held-secrets scrub alike.
Tests: the encoded and twice-encoded ssh password; 30 mutants, all killed.
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…(plan 038)
Copilot r4195504431, fix-now: a push URL whose scheme git does not carry
itself (evil://...) is refused before the push. Measured on git 2.43.0, git
resolves and runs git-remote-<scheme> from PATH for it, the <name>:: hazard
under a second spelling. The test plants a marker-leaving git-remote-evil on
PATH and asserts the refusal and that it never ran. The guard is the
submission's own; the runtime's shared guard is unchanged.
Found in the same pass: a remote named like a git option ([remote
"--force"], listed by git remote) is refused by name, because a network push
names the remote on the command line.
Tests: both; 32 mutants, all killed.
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Override local push policies to isolate submission refspec
src/opendox/runtime/repository_act.py:1967
The explicit refspec does not isolate this operation from repository-local push policy. push.followTags=true adds reachable annotated tags, while push.recurseSubmodules=only can skip the superproject refspec even when Git exits successfully; submit() can therefore mutate unreported refs or return a Submission for a branch that was not sent. Override both settings on this command and cover these local-config cases.
…92)
Copilot's review at 3ccf77b raised, as previously missed, that the
explicit refspec does not isolate the push from the checkout's own push
settings. MEASURED on git 2.43.0, exit 0 both times:
- push.followTags=true also sent an annotated tag the refspec never named;
- push.recurseSubmodules=only sent nothing at all, so submit() returned a
Submission for a branch that never left.
The shared core now passes --no-follow-tags and --no-recurse-submodules,
which outrank both keys and submodule.recurse. The runtime's
push_to_remote goes through the same core and gains the same guard.
The new test runs both settings against a local bare origin and asserts the
origin holds exactly the branch at the reported commit; red first at
3ccf77b, and mutants M33 and M34 (each option dropped) are killed.
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot review at 3ccf77b7 (review 5428856565): the overview's one "previously missed" item, answered. The review raised no inline finding, so there is no thread to resolve.
Finding: the explicit refspec does not isolate the push from the checkout's own push settings (src/opendox/runtime/repository_act.py, the shared push core).
Measured on git 2.43.0, exit 0 both times:
push.followTags=true also sent refs/tags/v1, an annotated tag the refspec never named.
push.recurseSubmodules=only sent nothing, so submit returned a Submission for a branch the origin did not hold.
Fix:d5aeb49. The core passes --no-follow-tags and --no-recurse-submodules, which outrank both keys and submodule.recurse. The runtime's push_to_remote uses the same core and gets the same guard.
Test:test_the_checkout_s_push_settings_neither_widen_nor_skip_the_push. It fails at 3ccf77b7 for both settings, the tag reaching origin in one case and the branch absent in the other, and passes at d5aeb49.
Mutants: M33 and M34 each drop one option, and both are killed. That makes 34 mutants in all, with 0 survivors.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
Network URLs are not fully parsed before Git begins the push operation.
Review effort: Balanced Findings: None
Previously missed (1)
In code that hasn't changed since last review
Validate malformed network URLs before starting the push
src/opendox/submission_push.py:190
This does not validate every URL before pushing: _destination_as_a_local_path calls urlsplit only for file://; malformed network URLs such as https://[bad/repo return None and reach the push core. That contradicts this pre-push refusal and can start a transport before the malformed destination is rejected. Parse the URL and access .port here, as refuse_credential_bearing_remote does, before classifying it as local.
Copilot review at d5aeb49d (review 5429620931): the overview's one "previously missed" item, answered. The review raised no inline finding, so there is no thread to resolve.
Finding: a malformed network URL such as https://[bad/repo is not parsed before the push starts (src/opendox/submission_push.py:190). _destination_as_a_local_path parses only a file:// URL.
Class: accepted limit, with no code change. The holder ruled it so, conditional on the measurement below showing a redacted SubmissionRefused with no ref moved. The measurement shows exactly that. The module's "refuse before the push" does not cover a malformed network URL; git refuses it at push time, before any connection is made.
Measured on git 2.43.0 (submit("sess-1"), the origin URL as shown):
case 0: https://[bad/repo
raw git push rc=128 stderr="fatal: unable to access 'https://[bad/repo/': URL rejected: Bad IPv6 address"
submit raised SubmissionRefused: the push of `sess-1` to `origin` (https://[bad/repo) failed (git push exited 128: fatal: unable to access 'https://[bad/repo/': URL rejected: Bad IPv6 address); nothing is reported as submitted
traceback has cause/context: False
local refs unchanged: True; refs = ['refs/heads/main', 'refs/heads/sess-1']
case 1: https://user:<secret>@[bad/repo?token=<secret>
raw git push rc=128 stderr: git echoes the token value verbatim
submit raised SubmissionRefused: the push of `sess-1` to `origin` (https://<redacted>@[bad/repo?token=<redacted>) failed (git push exited 128: fatal: unable to access 'https://[bad/repo?token=<redacted>); nothing is reported as submitted
traceback has cause/context: False
secrets in message or traceback: none
local refs unchanged: True; refs = ['refs/heads/main', 'refs/heads/sess-1']
No ref moved, and no destination was reached. curl rejects the URL as it parses it, so no connection is opened and no remote exists to move. The checkout's refs are byte-identical before and after, and no remote-tracking ref is written.
Redaction: the secret-bearing case is redacted in the message and the formatted traceback. The scrub also removes the end of git's sentence after the token. That is over-redaction, not a leak.
PR body: the accepted limits now quote this measurement.
…tal/error lines; three tests)
Lane 3's read-only review R1 (opensoft/openXfactory#656 comment
6022010349) was a GO with 0 BLOCKER and 0 MAJOR. Two of its items change
code or tests, and they are folded here.
MINOR: a failed push's refusal embedded git's whole stderr. Under the
user's own GIT_TRACE_CURL=1 or GIT_CURL_VERBOSE=1, curl's trace of every
request header is part of that stderr, and a checkout's http.extraheader
secret rode the SubmissionRefused (git redacts Authorization: alone). R1
measured it against a loopback 403. The refusal now keeps only git's
fatal: and error: lines and the adapter's timeout line, then scrubs as
before. The new test reproduces R1's measurement: http.extraheader =
X-Api-Key: <secret>, GIT_TRACE_CURL=1, and a loopback server answering
403. It asserts the secret is absent from the message and from the
formatted traceback. It was red first (the secret was in the message).
Mutants M37 (the whole stderr) and M38 (every line kept) are killed.
NIT: three tests that kill R1's surviving mutants:
- X5: the except CorpusRefused around metadata_held_open, reached with
the no-follow open's ELOOP. MEASURED on git 2.43.0: git hands back a
worktree's canonical git and common directories even through a
symlinked .git file or commondir, so a real link never reaches the
open. Mutant M39 is killed.
- X4: a URL past MAX_REMOTE_URL_CHARS is shown as <redacted-url>, and one
at the cap as it is. Mutant M40 is killed.
- X6: HTTPS:// is refused, and a planted git-remote-HTTPS does not run.
MEASURED: plain git push to HTTPS://... ran it. Mutant M41 is killed.
Mutants M17 and M29 are re-targeted at the new refusal line. All 41
mutants are killed, 0 survive, and the falsifier reads 60 passed.
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…all per pytest.raises (#92)
CI's validate failed at d186f6b (run 37507020596) on
tests/test_provider_boundary.py::test_the_generic_http_client_has_exactly_its_named_holders,
with ['submission_push.py: Authorization']. The comment above
_KEPT_PUSH_STDERR spelled the HTTP client's auth header by name, and that
test holds the name to its declared holders, which submission_push is not.
The comment is reworded, and the code is unchanged. The test was red
locally at d186f6b and is green now. Mutant M42 restores the word and is
killed.
SonarCloud python:S5778 at d186f6b, tests/test_submission_port.py:314
and :401: each LocalGitSubmissions is now constructed before its
pytest.raises block, so one call can throw inside it.
All 42 mutants are killed, 0 survive, and the falsifier reads 60 passed.
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Accepted limit, ruled by the holder: Copilot r4198584579 on T014's openDox-code#93 (submission_push.py:454, at 364dd7a1) found that a query value shorter than _SHORTEST_SCRUBBED (4) survives in a SubmissionRefused. A value under four characters is not a credential, and the threshold exists to prevent over-redaction. The accepted limits in this PR's body record it.
Holder, at READY: T011, the submission port. Review R1's GO is 6022010349.
Since R1's GO: two changes, neither touching behaviour.
The R1 fold's comment named the HTTP auth header, which test_provider_boundary.py allows only in its holder modules. It is reworded, and mutant M42 is killed.
Sonar's S5778 pair in tests/test_submission_port.py is fixed by building LocalGitSubmissions before each pytest.raises.
Gates at the head:
validate passes with triple 5532/5521/11/0/0;
SonarCloud's gate is OK with 0 open issues;
Copilot 5433258435 raises no findings;
10 threads, 0 unresolved;
0 closing keywords;
the merge state is CLEAN against main84f8ed83;
mutants are 42 of 42 killed.
Accepted limit: Copilot r4198584579, the short query value, as ruled. Its note is 6023299792.
…on-factory
main's tests/test_submission_default.py is T011's eb4976f copy, which
this branch already carried, so the add/add conflict there resolves to
this branch's copy: T011's nodes plus T014's three. The tree is
unchanged from 96a6ca8.
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…Submissions (plan 038) (#93)
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Arc: neutral-product-standalone-operability
## T014: `submission_factory` and `_submission_port` (plan 038, P4-B)
> **#92 (T011) has LANDED, as `09b8d44a`.** This branch was stacked on it and now merges `main` at `09b8d44a`. Its diff against `main` is T014's three files alone, from commits `930875db` and `41a2d6ea`. The merge brought nothing new to the tree: `main`'s `tests/test_submission_default.py` is T011's `eb4976f6` copy, which this branch already carried, so the add/add conflict there resolved to this branch's copy. The tree at `7a86c8a7` is byte-identical to `96a6ca83`'s.
- **Realizes**: 12.4 (opensoft/openXfactory#1144, `add-neutral-product-standalone-operability`).
- **Falsifier**: F12.2's server node in `tests/test_submission_default.py`; `test_session_snapshot.py:893-916` unchanged and green.
- **Ruled**: R2Q2 (opensoft/openXfactory#656 comment `6003486656`; the plan ruled `6013547504`). **Decisions**: none named by T014.
- **After**: T011 (#92).
### What it adds
- **`serve.py`: `submission_factory`**, beside `pull_request_factory` but separate from it, in three places:
- a class attribute on `DashboardHandler`;
- a `build_server(submission_factory=None)` keyword, with its docstring paragraph;
- its compose entry in the bound handler's attributes (`staticmethod(f)` if one is given, else `None`, as `pull_request_factory` has).
- **`serve.py`: the accessor, `DashboardHandler._session_submissions()`.**
- With nothing injected, it builds `LocalGitSubmissions(Path(self.checkout_root))`, a plain `git push` that names no platform and uses no `gh`.
- It answers only where the `session` capability is true, the same rule as `_session_pull_requests`. The push uses the invoking user's own git credentials, and a hosted plane never holds them.
- An injected factory is the binding. This is the seam through which a governed host may contribute its own `SubmissionPort`; none does in release 2 (R2Q3 (a)).
- A port that cannot be built leaves no port, rather than an error, exactly as for the pull-request port.
- **`cli.py`: `_submission_port(repo_root)`**, beside `_pull_request_port`. It returns `LocalGitSubmissions(repo_root)`, a named seam as `_pull_request_port` is.
- **Unchanged (R2Q2 (a))**: `pull_request_factory` and `_pull_request_port` keep `GhPullRequests` as their unset default and serve `gate open-pr` as before. `_session_pull_requests` and `_pull_request_port` are not edited.
- **The verb and the route are not here.** T015 adds `submit` and `POST /actions/session/submit`; they take their port from these two bindings.
### Files (T014's own commits, `930875db` and `41a2d6ea`)
- `src/opendox/serve.py`: the first phase-4 edit of this file (T014 → T015 → T016 → T052 → T057).
- `src/opendox/cli.py`: the first phase-4 edit of this file (T014 → T016 → T046 → T052).
- `tests/test_submission_default.py`: the server node, and two nodes beside it, so each new branch has a case that fails without it:
- `test_server_unset_submission_factory_binds_the_neutral_default`: F12.2's named node.
- A server built with nothing injected binds `LocalGitSubmissions` for its own checkout. It is a `SubmissionPort` and not a `PullRequestPort`, and it pushes `sess-1` to a local bare `origin`.
- The unset `pull_request_factory` still builds `GhPullRequests`.
- A hosted handler declares no submission port.
- `test_an_injected_submission_factory_is_the_servers_binding`: an injected factory's port is the binding, and a factory that raises leaves `None`.
- `test_cli_unset_submission_port_binds_the_neutral_default`: `cli._submission_port(checkout)` is the neutral class for that checkout and pushes there, and `cli._pull_request_port` is still `GhPullRequests`. F12.2's block asserts this inline too, but only once T015's `submit` verb exists, so the suite carries its own case.
- **SonarCloud's one finding, fixed.** At `672107ab` it raised `python:S9073` on `tests/test_submission_default.py:304`, a composite `assert ... and ...` in the neutral-port helper. `41a2d6ea` splits it into two asserts and changes no behaviour.
### The falsifier, run (red first)
Red was measured at T011's `5e3ca9c2`, with this PR's test file and no `src` change:
```
E AttributeError: type object 'BoundDashboardHandler' has no attribute '_session_submissions'
E TypeError: build_server() got an unexpected keyword argument 'submission_factory'
E AttributeError: module 'opendox.cli' has no attribute '_submission_port'
FAILED tests/test_submission_default.py::test_server_unset_submission_factory_binds_the_neutral_default
FAILED tests/test_submission_default.py::test_an_injected_submission_factory_is_the_servers_binding
FAILED tests/test_submission_default.py::test_cli_unset_submission_port_binds_the_neutral_default
3 failed, 1 passed in 2.79s
```
(The 1 that passed is T011's credential node.)
Green was measured at `7a86c8a7`, with `gh` hidden from `PATH` (CF-8) and `CI=true`. Two neighbours are included: `tests/test_web_boundary.py` (T025's change, now on `main`) and `tests/test_provider_boundary.py` (T011's last fix, now on `main`):
```
$ PATH=<venv>/bin:/usr/bin:/bin; command -v gh || echo 'gh: not found'
gh: not found
$ python -m pytest -q -rA tests/test_submission_default.py tests/test_submission_port.py tests/test_web_boundary.py tests/test_provider_boundary.py
PASSED tests/test_submission_default.py::test_a_credential_in_the_remote_url_never_reaches_the_report
PASSED tests/test_submission_default.py::test_server_unset_submission_factory_binds_the_neutral_default
PASSED tests/test_submission_default.py::test_an_injected_submission_factory_is_the_servers_binding
PASSED tests/test_submission_default.py::test_cli_unset_submission_port_binds_the_neutral_default
...
103 passed in 11.36s
```
### Mutants: 12, all killed
Each mutant replaces one exact string in `serve.py` or `cli.py`, runs `tests/test_submission_default.py`, and restores the file byte for byte. They were run at `7a86c8a7`:
```
KILLED M1 session gate removed: 1 failed, 3 passed (server node)
KILLED M2 session gate inverted: 2 failed, 2 passed (server node, injection node)
KILLED M3 injected factory ignored: 1 failed, 3 passed (injection node)
KILLED M4 construction failure propagates (no try/except): 1 failed, 3 passed (injection node)
KILLED M5 unset default is GhPullRequests: 1 failed, 3 passed (server node)
KILLED M6 unset default bound to another root: 1 failed, 3 passed (server node)
KILLED M7 unset default is absence: 1 failed, 3 passed (server node)
KILLED M8 compose entry drops the factory: 1 failed, 3 passed (injection node)
KILLED M9 compose entry absent: 1 failed, 3 passed (injection node)
KILLED M10 CLI default is GhPullRequests: 1 failed, 3 passed (CLI node)
KILLED M11 CLI default bound to the cwd: 1 failed, 3 passed (CLI node)
KILLED M12 CLI default is absence: 1 failed, 3 passed (CLI node)
```
### `test_session_snapshot.py:893-916`, unchanged and green, composed
- **Where it lives.** The protected node is openXdox-code's `tests/test_session_snapshot.py::test_the_loopback_serve_declares_the_pull_request_port`. It asserts that the server's unset port IS `GhPullRequests`.
- **Why it runs composed.** The file is in openXdox-code's declared exclusion (it reaches openxFactory's `doc_health`), so it runs only with openxFactory's `scripts/` on `PYTHONPATH`, as F12.1 runs (R2Q8 (a), CF-5).
- **How it was run.**
- openXdox-code at `main` `c6d15b27`, installed with its own `.[test]`.
- openxFactory at `main` `51456835`, with its nested `openDox` initialised (`dede32b4`).
- Then this branch's tree (T014's commit `930875db`) installed over the pinned `opendox`.
- A one-line session hook printed which `opendox.serve` the run imported.
- **Results.**
```
pinned opendox (dede32b): tests/test_session_snapshot.py 23 passed in 13.53s
this branch's opendox: tests/test_session_snapshot.py 23 passed in 24.56s
this branch's opendox: ...::test_the_loopback_serve_declares_the_pull_request_port 1 passed in 1.60s
WHICH-OPENDOX serve=<xvenv>/site-packages/opendox/serve.py _session_submissions=True cli._submission_port=True
```
openXdox-code's tree was not edited.
### The whole suite, as `validate` runs it
- **The run.** It was measured locally over T014's commit `930875db`, before T011's later heads (with `main` `84f8ed83`) were merged in, with `CI=true`, `OPENDOX_TEST_SANDBOX_REQUIRED=1` and a `postgres:16` service: `5515 passed, 11 skipped, 2 warnings in 1478.33s`, exit 0.
- **SKIPPED stays 11**, which is `EXPECT_SKIPPED`.
- **CI over the same tree.** `validate` at `96a6ca83`, whose tree `7a86c8a7` keeps byte for byte, printed `triple: selected=5535 passed=5524 skipped=11 failures=0 errors=0` (run 37515293136), with the sandbox proved live and a write outside its tmpfs refused.
- **The sandbox, not measured here.** bubblewrap 0.9.0 is installed on the local host, but it cannot create user namespaces there, and no test reads the sandbox switch yet. So the live sandbox is proved by this PR's own `validate` run, not locally.
### Copilot's one finding, an accepted limit
- **The finding.** Copilot r4198584579, raised at `d82c09a8`, is on T011's `submission_push.py`, now on `main` as `:454`: a query value shorter than `_SHORTEST_SCRUBBED` (4) survives in a `SubmissionRefused` message.
- **The ruling.** The holder ruled it an **accepted limit** on #92 (comment `6023299792`): a value under four characters is not a credential, and the threshold exists to prevent over-redaction. #92's accepted limits record it.
- **On this PR.** The thread here is answered and resolved. Copilot's later reviews, at `672107ab`, `364dd7a1` and `96a6ca83`, found nothing.
### What is NOT done
- **The `submit` verb, its route and its control** are T015. **`landing_factory` and `_landing_port`** are T016.
- **No governed host contributes a `SubmissionPort`** in release 2 (R2Q2 (a) with R2Q3 (a)). The host-side proof that the governed flow is unchanged is T019 (openxFactory).
- **The CI floors are not moved here.** `MIN_SELECTED` and `MIN_PASSED` are floors, and the three new nodes raise both counts. T017 re-pins phase 4's floors (`.github/workflows/validate.yml` is not T014's file).
- **No box is ticked.** T082 ticks 12.4.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e identity response shape and the single-writer chains (plan 038) (#1257)
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
**T002, second bookkeeping batch, plan 038: T094 and the slice entries T095 to T104, the identity response shape, the single-writer chains, and the ticks.** Bookkeeping, so this PR carries no `Arc:` line. It touches no `openspec/changes/` path, so no Rule 6 window applies. It began stacked on #1251's head; #1251 has landed (`1837ea75`) and `main` is merged in (`543f6ce1`), so the diff against `main` is this batch alone.
## From plan 038's `tasks.md`, T002
- **Task**: T002, "Release-2 base, and the re-measure at the ruling" (landed in #1251; this is its second batch of bookkeeping, the brief of the holder's `T002b`).
- **Realizes**: none (bookkeeping; FR-025). **Falsifier**: T002 names none. Its gates are the brief's, quoted under "Review and gates".
- **Ruled / Decisions**: none of its own. Every item is a ruling already posted on `#656`, or a landing already merged, encoded as worded and cited by comment id or merge commit.
## The items
| # | Where | What changed | Record |
|---|---|---|---|
| 1 | tasks.md: T094, T095 to T104, T073 | T094 ticked, with its result quoted: 436 composed reds over 51 files, outside 12.5's set (Base 2; 533 at Base 1). The `T095+` placeholder becomes ten entries, T095 to T104, each with its slice name, Files, After and Falsifier from R2-INV-R9's outline and the holder's rulings, `Lane: 3 (openXfactory-3)`. T073's After and Files name them. The map's means, the rulings (R9-R1 (a), R9-R2 (a), W1 to W7) and the OQ defaults are recorded once, above the entries | map `R2-INV-R9.md`; `6021830607`; claim `6021862323`; rulings `6021830531` |
| 2 | T095, T101, T104, T097 | T095: the two confirmed departures from OQ-R9-1 (`plane_host_for` untouched, an autouse fixture registers the declared host; `DECLARED_HOST_SUITES` guarded structurally). T101: `tests/declared_exclusion.yaml` for ONE entry (reasons `[doc_health]`, note dropped, the `only` list loses the file, count stays 66). T104: `tests/test_binding_stylesheets.py`, the pin 572 to 574. T097: its served-display respelling is R9-R1 (a) applied | `6022291206`; the T097 line is `6023517122` (the holder confirmed the citation, `6026622117`) |
| 3 | plan.md: the single-writer table; tasks.md Files and After lines | W7's chains: `tests/conftest.py` T020, then T021 and T026 in landing order, then T095, T073, T074; `tests/test_host_plane.py` T020, T026, T095; `declared_exclusion.yaml` T101, T073, T074; the four T074 test files T103 then T074; the census T025, T104, T015, T016, T057 (the row splits, so `test_web_boundary.py` keeps its own chain). T015's and T074's After gain T104 and T103 | `6021830531`, `6022291206` |
| 4 | tasks.md: T072, T074, T075 falsifiers | The four folds of #1253, in the arc change's own wording: T072 asserts that ONLY CR, LF and CRLF split rows; T074's seam tests assert that an empty-seam read names the seam AND its registrar; T075's host-wiring test shows a leg declaring only SOME of the four seams refused, and a leg declaring the six and none of the four accepted; T074's protected-suite oracle computes 12.5's set as 12.5 does (`git grep -l -e 'open-pr' -e 'open_pr' -e 'FakePullRequests'`), from the pre-arc and the final tree, the floor of 16 on each, and takes the union | openxFactory#1253 to `fc4fa0ff`; Copilot `5427373153` |
| 5 | spec.md FR-011; tasks.md T041 | FR-011's JSON shape gains `identity`, emitted and bounded as openDox-spec's finding schema bounds it (no `excerpt`, `text`, `content` or `quote` key, no number, strings of at most 200 characters, `{category, entry}` for a pathless finding, `{collided_id}` for a collision). T041's falsifier gains a response-shape test asserting exactly that bound. The coverage row for FR-011 names T041. The serialized-size cap was already T041's at the base (T041's text says so, and T042 "stores what T041 bounds"), so nothing moved | holder `6018624750` |
| 6 | tasks.md ticks | T011, T014, T021, T023, T025, T026 and T060 ticked, T070's tick gains #1253, and T002's own landing is recorded. Each merge commit was verified with `gh pr view <n> -R <repo> --json mergeCommit` (listed below) | the landings |
| 7 | tasks.md: T072 | A Files line (`src/opendox/lines.py`, `tests/test_lines.py`); the Ruled line gains `6023517122`: `head_sha` (a), its own public `head_sha` parity-tested against `serve._head_of`, `serve.py` untouched; the line split (a), `doxbench_defaults.py` untouched. Folding either private helper is recorded as unscheduled and optional, and is not scheduled | holder `6023517122` |
| 8 | contracts/health-finding.md:91 | The sentence reads: a stored `identity` makes a cross-run collision between STORED findings detectable; an exception-only finding is never stored; whether the engine reports it remains T046's concern. Nothing else on the line changed | holder `6018624750`; Copilot `5433292692` |
| 9 | plan.md; tasks.md | Copilot's three items at #1251's head `1eb8e9eb`, accepted by the holder at its landing: (a) the pin and landing-order row for T073 names T005 and T095 to T104 as prerequisites, and `T095+` reads T095 to T104 at the critical path, the lane table and the revision note; (b) the combined `conftest.py` and `test_host_plane.py` row splits, and the cross-lane summary gains T026 (and the other chains of item 3); (c) the same split in T020's, T021's and T026's Files lines | holder replies `4201056969`, `4201057311`, `4201057577`; READY note `6026651962` |
### The ticks, verified
| task | pull request | merge commit | merged |
|---|---|---|---|
| T011 | opensoft/openDox-code#92 | `09b8d44a` | 2026-10-06T19:15:55Z |
| T014 | opensoft/openDox-code#93 | `a7a1c4d3` | 2026-10-06T22:23:06Z |
| T021 | opensoft/openXdox-code#40 | `f70bc9c3` | 2026-10-06T19:07:10Z |
| T023 | opensoft/openXdox-code#42 | `d45a0939` | 2026-10-06T17:45:33Z |
| T025 | opensoft/openDox-code#91 | `84f8ed83` | 2026-10-06T17:33:31Z |
| T026 | opensoft/openXdox-code#43 | `36bbef79` | 2026-10-06T22:35:40Z |
| T060 | opensoft/openDox#20, the tag `dox-v1.2` (tag object `58538ff3`, on `6a9f4902`), opensoft/openDox#21 | `6a9f4902`, `c7f75845` | 17:46:59Z, tag 17:58:45Z, 19:02:39Z |
| T070 | openxFactory#1253 (T070b, added to its tick) | `fc4fa0ff` | 2026-10-06T18:56:42Z |
| T002 | openxFactory#1251 (its own landing) | `1837ea75` | 2026-10-06T22:31:42Z |
- **T021** landed with Copilot r4199337845 an ACCEPTED LIMIT (holder READY note `6023492215`); T021's entry records it.
- **T025's** entry says its 34 nodes are "quoted at T029"; that stays T029's, and the entry says so.
- **T011's** server node is T014's, as its own Falsifier says.
**Skipped, because already present at the base:** T020's and T024's ticks (#1251 item 13) and T004's tick (#1245, `260234b5`), all confirmed with `git show <commit>:<tasks.md> | grep`.
**T071 is NOT ticked.** Brett's word, "Ratify it (Recommended)" (`#656` `6023375303`), is recorded on T071's entry, but the change's ratification-record PR has not landed (no such PR is open or merged on `opensoft/openxFactory` at this writing). The box stays open.
## Readings the holder accepted (`6026622117`), disclosed as the brief requires
- **W7 omits T026 from the openXdox-code chains.** The single-writer table keeps T026 where its own ruling (`6016648451`) puts it, and lane 3's claim (`6021862323`) says T026's PR lands before T095. So the conftest chain reads T020, then T021 and T026 in landing order, then T095, T073, T074; and `test_host_plane.py` reads T020, T026, T095, as W7 gives it with T026 added.
- **R9-R2's last sentence** ("If the re-scoped test runs alone, it leaves the declaration, and the count moves with it, as the declaration's own rules require") is recorded in T100 as worded. `declared_exclusion.yaml` is NOT added to T100's Files: the holder's file list at `6022291206` names it for T101 only.
- **Edits outside tasks.md**, ruled in scope as each item names its place: plan.md (items 3, 9), spec.md FR-011 (item 5) and `contracts/health-finding.md:91` (item 8).
## Other notes on where an item needed a reading
- **Counting.** The task count reads 90 rows: the placeholder `T095+` is replaced by T095 to T104 (81 - 1 + 10).
- **Plan 034's task numbers.** The entries cite plan 034's T103 (#80, in T099's `Host` header) and plan 034's T086 (W2, in the rulings) as "plan 034's", because plan 038 now has its own T103.
- **OQ-R9-3.** The map did not measure the respelled gate-console and wheel-model skips; T097 and T103 say so, and the map's 127 passed and 5 skipped is quoted as the measurement.
- **Counts of slices** are copied in the map's own form (for example "16 nodes, and +5 on R9-R1 (a)"), not summed.
- **T095's chain after T026.** T095's After names T021 and T026, both landed.
- **Not mirrored from the arc's 4.1:** T075's falsifier gains the some-of-four refusal and the six-and-none acceptance, which #1253 folded. The arc's two older refusals (part-way through the seams; at the column call) are not in T075, since #1253 did not add them.
- **T046 and T057** carry no response-shape falsifier for `identity`: item 5 names T041's.
## Review and gates
- **`python3 scripts/validate-openspec-cli-pin.py --all`**, in the clone named `openxFactory`, at `691648c6`: exit 0, `Totals: 113 passed, 1 failed (114 items)`, `0 UNDISPOSITIONED failures`. The one failure is the dispositioned `add-chain-attestation` finding, the same on `main`.
- **openxFactory pytest.** The full local run was stopped at about 44% at a coordinator drain, so it is NOT a result and is not claimed. The repository's own gate, `pytest-suite` in CI at `691648c6`, completed `SUCCESS` (2026-10-06T23:32:38Z to 23:58:56Z).
- **Doc-health**, `scripts/doc-health.py --single-repo . --as-of 2026-10-07`, branch `691648c6` against `origin/main` `0992369a` in the same clone: the two reports are byte-identical (sha256 `ce17aadd6d96e484170e2ec4784e44972e33c7d1a6c65830ea14a1035f2ae976`; `Findings: 31 critical, 26 error, 69 warning, 20 info. New regressions vs previous report: 0.`). So no new error.
- **CI at `691648c6`**: all 14 check runs are `SUCCESS` (rollup `SUCCESS`): `pytest-suite`, `merge-master-approval` (the red inherited from `main` since #1252 was cleared by #1138), `openspec-cli-pin`, `doc-health-py314`, `openxdox-consumer-gate`, `wallet-validation`, `clearing-dispatch-gate`, `signed-execution-chain-gate`, `former-id-arrival-gate`, `release-tag-gate`, `openreposhape-pin`, the two `lane-line` runs and SonarCloud.
- **`main`** has moved to `0992369a` since the last merge (`543f6ce1`). GitHub reports this PR `MERGEABLE`, and the ruleset is not strict, so `main` is not merged in again (a merge would restart the 27-minute gate).
| Copilot at | verdict | findings | answered |
|---|---|---|---|
| `691648c6` (final; review `5435686665`) | Changes recommended | 1 (thread `4201443690`): T041's falsifier cannot verify what T046's `health list --json` and T057's HTTP route emit; the review summary adds that the new T095 to T104 collide with plan 034's task numbers cited unqualified at `spec.md:662`, `spec.md:1222` and `clarify-questions.md:437` | accepted limit (#656 `5988818366`): plan-record accuracy, not a bypass, and the T041 placement is the holder's own instruction (item 5). Answered (`4201487553`) and resolved |
1 thread, 0 unresolved. The holder ruled both points YES at `6027706377` and has them encoded in a THIRD batch, not here: the `identity` falsifier split across T041, T046 and T057, and the plan 034 references qualified. This PR therefore carries T041's wording as the brief gave it.
## Files changed
- `specs/038-opendox-document-tool-self-maintenance/tasks.md`, `plan.md`, `spec.md`
- `specs/038-opendox-document-tool-self-maintenance/contracts/health-finding.md`
## What is NOT done
- T071 stays open (its ratification record has not landed). No box of #1144 is ticked, and no task other than those listed is ticked.
- No scenario or spec delta beyond FR-011's JSON-shape bullet is touched, and nothing is under `openspec/changes/`. `README.md` is untouched.
- The T095 to T104 entries record the slices; none of their work is done here.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…al lander; feature 007's guard admits the landing's fast-forward (plan 038) (#90)
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Arc: neutral-product-standalone-operability
## T012 + T013 (plan 038, P4-D1): the landing seam, governance, confirmation and the neutral lander; feature 007's guard
One PR, as T012's "Lands with: T013" requires.
**Lane 3's review R2-DELTA gave GO at `4527432`** (openxFactory#656 `6068087981`; PR comment `6068087062`). The holder lands it.
- T008 has landed: codeXfactory/codeXfactory#515, merge `f1b019fe` (feature 007's FR-004a and C12).
- T010 (#89, `34c2064`), T025 (#91, `84f8ed8`), T011 (#92, `09b8d44`), T014 (#93, `a7a1c4d`) and T072 (#95, `9922088`) have landed, and this branch has merged all five (never a rebase).
- The two `session_pr` re-exports sit beside T011's names, after its submission-port block.
- Lane 3's R2-DELTA raised one new MINOR (`landing.py:836`), an accepted limit (openxFactory#656 `6069024568` item 1), stated below.
- Copilot's seventh review and Codex's review at `4527432` raised 4 findings. All four are accepted limits by holder ruling openxFactory#656 `6067853207` and are stated below; Copilot's "Changes recommended" at `4527432` stands for them.
- Copilot's sixth review (9 threads) and lane 3's review R2 (`6035652847`) are answered in `ff6f1cb`. R2's findings 1 to 5 are fixed and finding 6 is an accepted limit (holder ruling openxFactory#656 `6035797819`); the point-by-point answer is `6067643141`.
### T012: the landing seam
- **Realizes**: 12.6a (part: the seam, the query, the capability, the lander) and 12.6 (part).
- **Falsifier**:
- F12.2's thirteen `tests/test_landing_guardrails.py` nodes, including the static issuer check;
- named nodes beside them for R2Q7 (a)'s two refusals: `test_a_repository_with_no_main_is_unknown_and_refused_naming_it` and `test_no_declaration_refuses_naming_the_file_and_its_content` (lane 3's R2Q7 FIX);
- ADV-08's named node: `test_a_dirty_served_checkout_on_main_is_refused_before_merging`;
- the push URL's: `test_the_remote_check_reads_the_push_url_not_the_fetch_url` (a remote whose `pushurl` names a repository ahead of local `main` is refused; one with two push URLs is refused), and `test_the_push_url_never_reaches_git_argv`;
- lane 3's review R2: `branch.HEAD.mergeOptions` in F12.2's configuration walk, `test_a_driver_named_like_one_of_git_s_own_states_cannot_resolve_a_conflict`, `test_an_ignored_file_the_landing_would_overwrite_is_refused`, `test_only_the_lander_issues_the_served_fast_forward` and `test_a_git_without_attr_source_is_refused_by_name`.
- **Ruled**: R2Q1, R2Q3, R2Q4, R2Q5, R2Q6 and R2Q7 (openxFactory#656 `6003486656`; the plan was ruled at `6013547504`).
- **Decisions**: CF-1, N-1, N-11, N-16, OQ-12-17 and OQ-038-1.
### T013: feature 007's guard, by R2Q6 (a)'s four exceptions
- **Realizes**: 12.6a (part).
- **Falsifier**: `tests/test_session_git.py` whole, quoted below.
- **Ruled**: R2Q6. **Text**: feature 007's FR-004a and SC-002, as T008 landed them (codeXfactory/codeXfactory#515, `f1b019fe`).
### The falsifiers, run at `4527432` with `gh` hidden from PATH (the full local suite in CI form there, with its Postgres and a live sandbox: 5795 passed, 11 skipped, in 39:51)
F12.2's command, verbatim (the thirteen nodes by name):
```text
$ python -m pytest -q "tests/test_landing_guardrails.py::test_land_requires_an_explicit_human_act" … "tests/test_landing_guardrails.py::test_only_the_interactive_layers_call_an_issuer"
............. [100%]
13 passed in 8.20s
```
T012's five named nodes:
```text
$ python -m pytest -q "tests/test_landing_guardrails.py::test_a_repository_with_no_main_is_unknown_and_refused_naming_it" "tests/test_landing_guardrails.py::test_no_declaration_refuses_naming_the_file_and_its_content" "tests/test_landing_guardrails.py::test_a_dirty_served_checkout_on_main_is_refused_before_merging" "tests/test_landing_guardrails.py::test_the_remote_check_reads_the_push_url_not_the_fetch_url" "tests/test_landing_guardrails.py::test_the_push_url_never_reaches_git_argv"
..... [100%]
5 passed in 3.05s
```
`tests/test_session_git.py` whole (105 cases), and the new file whole (113 cases), at `4527432`:
```text
$ python -m pytest -q tests/test_landing_guardrails.py tests/test_session_git.py
218 passed in 80.84s (0:01:20)
```
**Red first.** The same two test files, run against `origin/main`'s code (`a7a1c4d`):
- `tests/test_landing_guardrails.py` does not collect (`ImportError: cannot import name 'landing' from 'opendox'`), so F12.2's command fails, as #1144 says it does today.
- `tests/test_session_git.py` reads `21 failed, 80 passed`. The failures are the moved pin, the admitted fast-forward and its refusals, the eight pinned-settings cases, the ambient-environment case, the NUL-field read, the lookalike `main`, the escaped refusal, and the exact `branch_sha`.
- `("merge", "other-branch")` at `:523` passes on both sides, as T013 requires.
**Mutants: 106 of 106 killed** (on `ff6f1cb`'s code, which `4527432` carries unchanged). There is one mutant per guard, each run against the tests that must catch it, and each was killed by a test failure: pytest exit 1, never an error or a missing node. They cover:
- **the capability** (C1–C12): branch binding, head binding, single use, a non-token, a non-TTY stdin, any answer at the terminal, direct construction, a third issuer, an issuer reached from a product module, any nonce, a non-ASCII nonce reaching `encode()`, and a discarded token's record kept;
- **the governance** (G1–G16): among them, the host never asked, a host without an instrument not outranking, a host that fails to load read as absent, the declaration read from the working tree, standalone without the local install, HEAD's branch read instead of `main`, a duplicate key, a linked declaration, the default profile taken as a host, a lander bound whatever governs, the instrument route skipping the confirmation, and the head not read again before the submission;
- **the lander** (L1–L22): rerere, no `--no-ff`, a dirty `main` checkout, no `ls-remote` check, N-16 reversed, one remote of several, a checkout on another branch fast-forwarded, `main` held elsewhere, a push, no remedy, a conflict reported as a failure, `.gitattributes` reaching the merge, no driver check, the strategy left to configuration, `main` moved by its ref alone, `merge.default` unpinned or pinned to a name a driver can hold, `merge.directoryRenames` unpinned, a named `text` driver taken as git's own, quoted conflict paths, `main` not compared with the merge's tip, and a `main` that did not land reported as landed;
- **the remote check and the messages** (R1–R5, S1, B1–B3, W1–W3): the redaction missing the fragment and spaced forms, the check reading the fetch URL, several push URLs not refused, the push URL riding in the argv, `get-url` without `--push`, a path shown as it is, the prompt, the dirty-checkout refusal and the fast-forward refusal showing raw names, the top's prefix check dropped, and the push URL and the holder's path read stripped;
- **the hooks** (H1–H4): the merge, the landing worktree's checkout, the `switch`, and the fast-forwards running hooks;
- **the byte reads** (N1–N3, X1): NUL-delimited fields read in text mode, the runner ignoring `binary`, text mode decoding strictly, and the served `HEAD` read stripped;
- **the audit** (A1);
- **the guard** (T1–T9, V1): any merge on a clean `main`, a dirty checkout, another branch, below the root, `merge` on the name list, a short id, the fast-forward's settings not pinned or not delivered, the pins back in the argv, the runner passing the ambient environment, and `branch_sha` suffix-matching;
- **Copilot's sixth review** (P1–P12), each of these guards removed:
- the transport pre-check, and `GIT_ALLOW_PROTOCOL`;
- scrubbing the URL's values by value, and keeping only git's own stderr lines;
- the probe's time bound, batch-mode ssh, and the prompt switched off;
- the escaped branch name in the conflict remedy and the already-landed refusal;
- the binding's acceptance of a name a strip would change;
- the bytes reader going through the funnel's pins;
- the inside-a-work-tree check;
- **lane 3's review R2** (Q1–Q9), each of these broken:
- `branch.HEAD.mergeOptions` left unpinned;
- a driver named `set`, `unset` or `unspecified` able to answer (one mutant each);
- an ignored file overwritten, and the file-where-a-directory-goes case not seen;
- an older git escaping as a raw `GitError`, and the floor not named at the merge;
- another module naming the served fast-forward.
### What this changes
**`src/opendox/landing.py` (new).**
- `LandingPort` has one operation, `land(branch, *, confirmation) -> Landed`.
- `Landed` carries `merge_commit` and `previous_main`. Its `served_checkout` is `fast-forwarded` or `left`, and `pushed` is always False.
- `MergeConflict` carries the paths, read NUL-delimited as bytes and so exactly as spelled, and the remedy: bring `main` into the branch and resolve there. Its message shows a path or a branch name that holds a control or format character escaped (`repr`), so neither can write to the terminal or reorder the message. Every refusal that names the branch does the same.
- `LandingRefused` carries a `code` for T016's routes.
- `repository_governance(checkout_root)` answers `standalone`, `governed` or `unknown`, failing closed, in this order:
1. the checkout must be a working tree's top, with a branch `main` (R2Q7 (a)). The top is asked of git: the checkout must be inside a work tree, with an empty prefix. It is never compared as a path, so a directory name ending in a space or a newline reads;
2. the install mode must resolve;
3. a registered host profile decides, whatever any file says (R2Q4 (a));
4. otherwise `.opendox/governance.yaml` decides, read from the blob at `main`'s tip (N-1). `standalone` needs `OPENDOX_INSTALL_MODE=local` or `--local` (FR-007; ADV-38).
- With no declaration, the refusal names the exact file and its content.
- `bound_lander` binds the neutral lander under `standalone` only.
- `request_landing` routes a landing:
- under `governed` with an instrument, it submits the confirmed branch through the instrument, and nothing merges. The branch's head is read again immediately before `submit`, and a branch that moved is refused;
- otherwise it refuses by name: `governed-without-an-instrument`, or why the governance is `unknown`.
- **The neutral lander**, in order:
1. refuses `main` (R2Q5 (a));
2. re-reads the governance at the moment of landing;
3. spends the confirmation;
4. reads `main` at the remote's PUSH URL first (`git remote get-url --push --all <remote>`; the fetch URL where no `pushurl` is set):
- a remote with several push URLs is refused (`several-push-urls`). The URLs are read as bytes and no record is dropped, so a URL holding a newline reads as two and is refused, never trimmed;
- a push URL whose transport is a program git would run is refused before anything runs (`remote-transport`). That covers `<name>::`, and a `<scheme>://` that git does not carry;
- the URL is probed with `git ls-remote <transient remote> refs/heads/main`, where the transient remote is `remote.opendox-probe-<hex>.url` passed in the command's environment (`GIT_CONFIG_COUNT=1`). So the URL, and any credential in it, never reaches git's argv;
- the probe admits only git's own transports (`GIT_ALLOW_PROTOCOL`), so a second `insteadOf` rewrite runs no helper;
- the probe never waits on a human: no prompt, no askpass, and ssh in batch mode, which also outranks a repository's own `core.sshCommand`. It is bounded by `PROBE_TIMEOUT` (60 s);
- a remote with no `main` passes (N-16);
- every message is redacted:
- every value the URL carries is removed BY VALUE (`submission_push._scrubbed`);
- then the runtime's `redact_credentials` and 12.1a's patterns run, the fragment form (`#token=`) and a value after whitespace included;
- a failed probe keeps only git's `fatal:` and `error:` lines, so curl's trace headers never reach a message;
5. refuses a dirty served checkout on `main` before merging (ADV-08), and refuses where another working tree holds `main`;
6. makes the `--no-ff` merge in its own detached worktree under `<repo>-worktrees/landing/`, with git's own strategy and drivers only:
- `.gitattributes` and the global attributes file are out of the merge;
- a driver this machine's attributes still select is refused, a named `text` or `binary` included;
- `merge.default` is pinned to a fresh driver name, and `merge.directoryRenames` to `conflict`;
- `branch.HEAD.mergeOptions` is pinned empty. The merge runs on a detached HEAD, where `-X theirs` answered a conflict and `-s ours` dropped the branch (lane 3's review R2);
- drivers named `set`, `unset` and `unspecified` are pinned to fail. `check-attr` cannot tell those string values from git's own states;
- a git without `--attr-source` (older than 2.42) is refused by name (`merge-failed`), never with a raw error;
- rerere is off;
- no hook runs (`core.hooksPath=/dev/null`) in the landing worktree's checkout, the merge, its `switch`, or either fast-forward. A hooks path inside the tree is the branch author's to write, and a hook that pushed would contradict `pushed=False`;
7. then moves `main`:
- where the served checkout holds `main` and is still clean, by `git merge --ff-only <merge commit>` there. First it refuses (`ignored-files-in-the-way`, naming the files and the remedy) when the checkout holds an IGNORED file where the landing writes. That covers the path itself, a file under it, and a file where it needs a directory. A fast-forward overwrites an ignored file with no word;
- where it holds another branch, the landing worktree takes `main`, checks that it is still the merge's tip, and fast-forwards it there (`left`). git refuses `main` to the landing worktree while another working tree holds it, and refuses `main` to every other working tree while the landing worktree does. So `main` never moves by its ref alone.
- It pushes nothing (R2Q6 (a)), and every git command goes through `session_git.SessionGit`.
**`src/opendox/landing_confirm.py` (new).**
- The confirmation capability: opaque, bound to the branch and its head, and single-use.
- It has exactly two issuers:
- `confirm_at_terminal`, the `/dev/tty` prompt. It refuses a stdin that is not a terminal, refuses when there is no controlling terminal, and mints only on the typed branch name (N-11);
- `LandingNonces`, the server's per-branch nonce (OQ-12-13). A nonce that is not an ASCII string is a mismatch, never an exception.
- A token's record is dropped when the token itself is gone (`weakref.finalize`), so a long-running server keeps no record per confirmation. A spent token still held is still refused as spent.
- A token's binding refuses only an empty branch name. git decides what a branch name is, and a legal one may end in a no-break space.
- `INTERACTIVE_LAYERS` names the only modules that may call them: T015's and T016's `cli_branch_actions.py` and `serve_branch_actions.py`.
**`src/opendox/session_pr.py`.** It re-exports `LandingPort` and `repository_governance` (FR-007; ADV-23), beside T011's submission-port names. `PullRequestPort` keeps its three operations.
**`src/opendox/session_git.py` (T013).**
- The name-only allowlist at `:99` is restated, unchanged, and `merge` stays off it.
- An ARGUMENT check admits exactly the three arguments `merge --ff-only <commit>`, with `<commit>` a full object id and never a ref name (FR-004a exception 1). It admits them only at the served ROOT, and only while the served checkout holds `main` and `git status --porcelain` (untracked files included) is empty.
- The guard reads that state from git immediately before the move. `:93`'s stated rule names the exception (exception 2).
- `fast_forward_served(commit)` issues the move, then checks that the served checkout holds `main` at the commit. Otherwise it refuses, and never reports a move it did not make.
- The funnel pins `pull.twohead=ort` and an empty `branch.main.mergeOptions` in that one command's ENVIRONMENT (git's command-scope `GIT_CONFIG_COUNT`), never in its argv. Measured on git 2.43: `-s ours` made a new merge commit, and `--squash` changed the index and moved nothing.
- `SubprocessGitRunner` runs git with `local_git_adapter.sanitized_git_environment()`. So `GIT_DIR`, `GIT_WORK_TREE` and their relatives never redirect a command the guard approved.
- The fast-forward's environment pins `core.hooksPath` to no directory too, so no `post-merge` hook runs.
- `shown()` escapes, for a message, text that holds a control or format character (a bidi override included). The fast-forward refusal, `land`'s refusals and the confirmation prompt all use it.
- `branch_sha` reads the exact ref (`show-ref --verify`), and `checked_out_at` reads a working tree's path as spelled, a trailing space included.
- `git_nul(cwd, *args)` reads a NUL-delimited output as BYTES and decodes each field UTF-8 with `surrogateescape`, with no newline translation, so a carriage return or a non-UTF-8 name reaches a guard as git wrote it (Copilot 4195681954; openxFactory#656 `6026275158`). It runs through the funnel, so the fast-forward's pins apply to it too. Text mode decodes with `surrogateescape` too, so no git output raises.
- The served checkout's `HEAD` ref is read exactly: the legal branch `main\u00a0` is never taken for `main`.
- `ls_remote_url(cwd, url, ref)` probes one ref at a URL through a transient remote in the command's environment, for the landing's remote check. It runs with `PROBE_ENVIRONMENT` (non-interactive, git's own transports only) and `PROBE_TIMEOUT`. The runner takes an `env` overlay and a `timeout`, and a timeout answers exit 124.
**`tests/test_session_git.py` (T013).**
- `:523`'s `("merge", "other-branch")` still refuses, unchanged.
- `:563-564`'s pin moves to the admitted form. `merge` stays absent from the name list, the admitted argv is `("merge", "--ff-only")` plus a full id, and the pure guard admits it on a clean `main` and nothing else.
- New cases:
- the admitted fast-forward;
- every pinned setting, through all three entry points (the bytes reader included);
- refusals: a dirty checkout (tracked and untracked), another branch, a subdirectory, every other merge spelling (the `-c`-pinned spelling included), and a short id;
- a fast-forward that lands elsewhere;
- the ambient-environment case.
**`tests/test_landing_guardrails.py` (new).**
- F12.2's thirteen nodes, by their ratified names.
- T012's three named nodes.
- The lander's mechanics, the merge's drivers and settings, the governance reading's edges, and the audit's two nodes.
- The regressions for Copilot's sixth review and lane 3's review R2.
- The host-side nodes run against a registered TEST host profile that declares an instrument (R2Q3 (a)).
### The repository-creation audit (named, as T012 asks)
Every place openDox's product code creates a repository:
| site | before | now |
|---|---|---|
| `src/opendox/conformance_corpus.py:322` (`transpose`, the populated state) | `git init -q`: `init.defaultBranch` decided | `--initial-branch=main` |
| `src/opendox/conformance_corpus.py:431` (`transpose`, the empty state) | `git init -q`: `init.defaultBranch` decided | `--initial-branch=main` |
| `src/opendox/authoring.py:508` | `--initial-branch=main` already | unchanged |
| `src/opendox/runtime/repository_act.py:982-983` (`init --bare`) | `--initial-branch={branch}`, `DEFAULT_BRANCH = "main"` | unchanged, so T011's file is not touched |
Two tests hold it:
- `test_every_repository_opendox_creates_names_its_initial_branch`, a static sweep of every `git init` in the package;
- `test_the_conformance_corpus_is_born_on_main_whatever_git_defaults_to`, run under an ambient `init.defaultBranch = trunk`.
Two places are outside the product and left as they are:
- `acceptance/at_r1_http.py:1774`'s `git init -q` is AT-R1's own fixture, not product code, and AT-R1 asserts nothing about the branch;
- `.github/workflows/release.yml` already uses `-b main`.
### Readings this PR takes, for the holder to rule on (inferred, not ruled)
1. **A registered host profile WITHOUT an instrument also outranks a declaration.** The repository is then `governed`, governed-without-an-instrument, and refused.
- 12.6a's precedence runs "the host, then main's declaration".
- T019 asserts "with the real host registered: no lander bound; the host outranks a declaration", and no production host declares an instrument in release 2.
- So host presence decides, the fail-closed reading. The other reading would bind a lander under a host on the strength of a file.
2. **The instrument's facet is named `SUBMISSION_INSTRUMENT`.** It is a factory `(checkout_root: Path) -> SubmissionPort`. The plan names the instrument ("its contributed `SubmissionPort`, declared in its host profile", R2Q4 (a)) but not the facet. `request_landing` calls the instrument's `submit(branch)`, the operation of T011's `SubmissionPort`, now in `session_pr`.
3. **No `main` is `unknown` even under a host.** A flag/setting disagreement on the install mode is `unknown` in every mode. Both are checked before the host.
4. **"Clean" is git's own sense, untracked files included.**
- With several remotes and none named `origin`, each remote's `main` is checked.
- An `ls-remote` that fails is refused: it cannot be verified, so it fails closed.
5. **A confirmation is spent by the first presentation that finds it**, even if the landing then refuses. Under `governed` with an instrument, the routed submission still requires and spends one.
6. **FR-004a's "exactly those three arguments" is read as the argv the guard admits.** CONFIRMED by the holder (openxFactory#656 `6026275158`).
- The two settings that could turn that fast-forward into a merge (`pull.twohead`, `branch.main.mergeOptions`) are pinned in the command's environment, not its arguments. The command git runs is still `git merge --ff-only <commit>`.
- Unpinned, a repository's own configuration can make that command create a merge commit, or stage a squash and move nothing.
7. **`--attr-source` needs git 2.42, above the plan's stated floor of 2.31.** On an older git, `land` is refused by name (`merge-failed`, naming 2.42), as data-model.md § Landed says, and nothing is merged. Raised by lane 3's review R2; inferred, not ruled.
### Stated limits (Copilot's reviews and lane 3's R2; for the holder)
- **Neither fast-forward can hold `main` across the check and the move.** The holder WIDENED this limit to both paths (openxFactory#656 `6067853207` item 3, for Codex P1 `4223462529`).
- The reads (the guard's, and `land`'s check of `main`'s tip) and `git merge --ff-only <commit>` are separate git processes. git has no lock that a separate process can hold across them, and holding the served `index.lock` would also stop the fast-forward.
- On the served path, a switch of the served checkout by its own user in that window fast-forwards the branch it switched to. The post-check refuses rather than report a landing (`test_a_served_checkout_switched_during_the_fast_forward_is_never_reported`).
- On BOTH paths, another local git process that rewinds `main` to an ancestor of the merge commit in that window is undone, and the landing reports success.
- On the `left` path, git refuses `main` to every other working tree while the landing worktree holds it.
- A ref update made outside any working tree is not refused.
- `merge --ff-only <commit>`, the one move feature 007 admits, has no compare-and-swap form. `update-ref refs/heads/main <merged> <main>` on the `left` path is not adopted: it would reverse the "`main` never moves by its ref alone" design (Copilot's second review; mutant L15).
- It is a race between the operator's own local processes, not a payload.
- **A checkout path ending in a newline or a carriage return cannot land** (Copilot `4223441552`, the same defect as Codex P2 `4223462534`). ACCEPTED as a limit by the holder (openxFactory#656 `6067853207` item 1).
- `checked_out_at` reads `%(worktreepath)` line by line, so the path comes back altered, and `land` refuses as `main-checked-out-elsewhere`.
- It fails closed, and the served-`HEAD` guard still refuses any move of the wrong branch.
- The governance reading does take such a path (`test_a_checkout_whose_path_ends_in_a_newline_is_read`).
- **One refusal can print a branch name unescaped** (Copilot `4223441643`). ACCEPTED as a limit by the holder (openxFactory#656 `6067853207` item 2).
- `fast_forward_served`'s post-check refusal names the branch the served checkout holds, as it is.
- It is reachable only after a concurrent switch to a branch whose name holds a bidi or format character, and it can only reorder how the message displays.
- **Clean, smudge and process filters run during the landing's checkouts** (Copilot 4199664554). ACCEPTED as a limit by the holder (openxFactory#656 `6026622117` item 1).
- A filter's command comes from git's configuration, not from the repository's content. Disabling filters would write a different working tree: LFS pointers in place of their content.
- A filter runs during `land` as it runs during the owner's own `git checkout`. The landing's merge still takes attributes out, so no filter decides a conflict.
- **The static issuer check reads source, so a deliberately dynamic reach can pass it** (lane 3's review R2, finding 6). ACCEPTED as a limit by the holder (openxFactory#656 `6035797819`).
- `getattr` or `importlib` written to evade the check is a deliberate structural edit of reviewed openDox code. It is the class of `6028383410` and `6028539440`, which 12.6a's in-process limit for deliberate code covers.
- Implicit string concatenation is caught.
- **A git older than 2.31 with a remote attached is refused as `remote-unreadable`, not by the named 2.42 floor** (lane 3's review R2-DELTA, `landing.py:836`). ACCEPTED as a limit by the holder (openxFactory#656 `6069024568` item 1).
- Such a git ignores `GIT_CONFIG_COUNT`, so the transient-remote probe fails before the merge's floor refusal is reached, and that refusal tells the user to fix or remove the remote.
- It fails closed: nothing is merged and `main` is where it was. Without a remote, the same git gets `merge-failed` naming 2.42. Only the message's precision is affected.
- **The instrument receives a branch name.**
- `SubmissionPort.submit(branch)` is T011's signature (12.1).
- The head is read again immediately before `submit`, but an adapter that reads the branch later can still see a newer head.
- Carrying the confirmed object id needs that interface to change, which is T011's or a later task's.
### What is NOT done here
- **T016:**
- `landing_factory` and `_landing_port`;
- the `land` verb, its routes and `actions.land`;
- the confirm control;
- the surface nodes in this test file;
- a live session ending by the merge observation (`branch_session.py`).
- **Later tasks:** T017 (the CI floors: this PR raises SELECTED and PASSED, and skips nothing) and T018 (the README).
### Files changed
- `src/opendox/landing.py` (new)
- `src/opendox/landing_confirm.py` (new)
- `src/opendox/session_pr.py` (the re-exports only)
- `src/opendox/session_git.py` (T013)
- `src/opendox/conformance_corpus.py` (the audit's two sites)
- `tests/test_landing_guardrails.py` (new)
- `tests/test_session_git.py` (T013)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Arc: neutral-product-standalone-operability
## T015: the `submit` verb, route and control (plan 038, P4-C)
> **Stack:** #92 (T011) landed as `09b8d44a`, #93 (T014) as `a7a1c4d3`, and #90 (T012/T013) as `6827cafc`. This branch merges `main` at `6827cafc`, so its diff against `main` holds T015's files and the collateral the holder admitted (listed below), nothing else.
- **Realizes**: 12.4a (opensoft/openXfactory#1144, `add-neutral-product-standalone-operability`).
- **Falsifier**: F12.2's five `tests/test_submit_route.py` nodes; CLI tests in `tests/test_cli_branch_actions.py`; a test that a host profile replacing the default sees no `actions.submit` key.
- **Ruled**: R2Q1, R2Q3, R2Q4, R2Q5, R2Q9 (item 7) (the plan ruled on opensoft/openXfactory#656 comment `6013547504`). **Decisions**: CF-1, N-2, N-17, OQ-12-9, OQ-12-14.
- **After**: T014 (#93), T025 and T104 (#94; the census fixture's chain is T025 → T104 → T015), T005 (the `--local` line).
- **Contract**: plan 038's `contracts/cli-http-submit-land.md`, the submit half.
### What it adds
- **`opendox submit --repo-root PATH --branch BRANCH [--local] [--json]`** (new `src/opendox/cli_branch_actions.py`). This is 12.4a's ratified shape.
- It is contributed through `default_profile.py`'s `SUBCOMMAND_EXTENSIONS` (N-2).
- It pushes through T014's `cli._submission_port` binding: `LocalGitSubmissions` by default, which is plain git and never `gh`. Where a host contributes a port, it uses that one (R2Q4 (a)).
- It prints the `Submission` report (remote, ref, URL with any credential redacted, branch and commit), or one JSON object with `--json`.
- **No actor gate** (OQ-12-9).
- **The install mode is not read** (N-17). `--local` is refused only where it disagrees with `OPENDOX_INSTALL_MODE=hosted`, and the refusal names both.
- **Refusals** are a named sentence on stderr with exit 1, with nothing pushed and no traceback:
- `main` (R2Q5 (a)), before any port is asked;
- no remote, or several and none named `origin`;
- several push URLs, or a rejected push;
- a report that does not name where the work went;
- a failure the port did not name. This one gets a fixed sentence naming the exception's type alone.
- **Redaction and checks at the boundary.**
- The report's `url` and `remote`, and every refusal's message, pass through `redacted_text` where both doors print them (12.1a). Every `scheme://` URL in them goes through `redact_destination` first, which treats any non-ssh userinfo, and every query and fragment value, as a secret. The host is kept.
- The report's `branch`, `ref` and `commit` are checked rather than trusted. They must be the submitted branch, `refs/heads/<that branch>`, and a full object name.
- Both hold whoever answered, a host's contributed port included.
- **`POST /actions/session/submit`** (new `src/opendox/serve_branch_actions.py`). It is contributed through the default profile's `ROUTE_EXTENSIONS` (`BranchActionRouteExtension`) and `HANDLER_CONTRIBUTIONS` (the `BranchActionRoutes` mixin).
- **12.4a's three-clause gate runs before any body byte is read:**
1. off loopback → 403 `loopback_only`. This is the hosted plane's refusal, and it is the route's own.
2. no `session` capability or no resolved actor → 403 `action_unavailable`.
3. not the human console (the console token, a trusted `Host`, a JSON body, no foreign `Origin` or `Referer`) → 403 `agent_invocation`.
- **The body carries `branch` alone.** Any other key, `repo_root` included, gives 400. The route takes no repository from the request.
- **Answers:**
- no port → 403;
- `NoSubmissionTarget` → 409 `no_submission_target`;
- other `SubmissionError` → 409 `submission_refused`;
- any other exception → 500 `submission_failed`, with only the type logged;
- success → 200 with the `Submission` object.
- **`actions.submit`** (`serve.py` `compute_capabilities`).
- The key is PRESENT only where a route binding answers `POST /actions/session/submit`, which happens only under openDox's own profile.
- Its VALUE is the local human's: actor, real checkout and loopback, derived from the bindings as `gate`'s is (`answers_the_submit`).
- Core `_DEFAULT_CAPABILITIES` gains nothing (OQ-12-14). A host profile that replaces the default sees no `submit` key, route, handler or verb (R2Q3 (a)).
- **The submit control** (new `src/opendox/web/views/branch-actions.js`, wired by `web/app.js` and `web/index.html`).
- It is keyed on `actions.submit === true` and the console token, never on `session`.
- It is not offered in a composed render.
- It is withheld while an active key names another repository than the one `/capabilities` declares as `repository`, because the route pushes from the served checkout alone. With no repository active, as on a standalone plane, which has no snapshot index, it is offered (`anotherRepositoryIsActive`; Copilot's finding and lane 3's MAJOR, below).
- The account menu's access line names `submit` where it is granted (`views/account-menu.js`, admitted below; Codex's finding, below).
- It never proposes or sends `main`, and it states a refusal in the server's own words.
- The census fixture and `tests/test_web_boundary.py` gain its rows and its two boundary tests.
### The falsifier, run (red first)
**Red, stage 1.** The base tree with this PR's tests and no `src` change:
```
E ImportError: cannot import name 'serve_branch_actions' from 'opendox' (…/red-base/src/opendox/__init__.py)
ERROR tests/test_submit_route.py
1 error in 0.60s
```
**Red, stage 2.** The two modules present but not wired into the default profile. Each route node answered `{'error': 'unknown_action', 'message': 'no such action route'}`, and each CLI case exited with `SystemExit: 2`:
```
FAILED tests/test_submit_route.py::test_submit_route_is_refused_off_loopback
FAILED tests/test_submit_route.py::test_submit_route_is_refused_without_a_resolved_actor
FAILED tests/test_submit_route.py::test_submit_route_is_refused_without_the_console_token[absent]
FAILED tests/test_submit_route.py::test_submit_route_is_refused_without_the_console_token[wrong]
FAILED tests/test_submit_route.py::test_submit_route_is_refused_from_a_foreign_origin[Origin]
FAILED tests/test_submit_route.py::test_submit_route_is_refused_from_a_foreign_origin[Referer]
FAILED tests/test_submit_route.py::test_submit_route_takes_no_repository_from_the_request[repo_root]
FAILED tests/test_submit_route.py::test_submit_route_takes_no_repository_from_the_request[repository]
FAILED tests/test_submit_route.py::test_submit_route_takes_no_repository_from_the_request[checkout_root]
FAILED tests/test_cli_branch_actions.py::test_submit_pushes_the_branch_and_reports_where_it_went
…
FAILED tests/test_cli_branch_actions.py::test_the_default_profile_contributes_submit
31 failed, 4 passed in 22.32s
```
**Green, at `e7ee97b8`:**
```
$ python -m pytest -q -rA <F12.2's five test_submit_route.py nodes> tests/test_submit_route.py::test_a_host_profile_replacing_the_default_sees_no_submit_key
PASSED tests/test_submit_route.py::test_submit_route_is_refused_off_loopback
PASSED tests/test_submit_route.py::test_submit_route_is_refused_without_a_resolved_actor
PASSED tests/test_submit_route.py::test_submit_route_is_refused_without_the_console_token[absent]
PASSED tests/test_submit_route.py::test_submit_route_is_refused_without_the_console_token[wrong]
PASSED tests/test_submit_route.py::test_submit_route_is_refused_from_a_foreign_origin[Origin]
PASSED tests/test_submit_route.py::test_submit_route_is_refused_from_a_foreign_origin[Referer]
PASSED tests/test_submit_route.py::test_submit_route_takes_no_repository_from_the_request[repo_root]
PASSED tests/test_submit_route.py::test_submit_route_takes_no_repository_from_the_request[repository]
PASSED tests/test_submit_route.py::test_submit_route_takes_no_repository_from_the_request[checkout_root]
PASSED tests/test_submit_route.py::test_a_host_profile_replacing_the_default_sees_no_submit_key
10 passed in 7.31s
$ python -m pytest -q tests/test_submit_route.py tests/test_cli_branch_actions.py
102 passed in 33.12s
```
**F12.2's submission half, verbatim** (opensoft/openXfactory#1144 `tasks.md`, the FALSIFIED BY block, dedented). It ran at `e7ee97b8`, this head, from a `git archive` of the commit, in a fresh venv (`pip install ".[test]"`), with a PATH holding `git` and no `gh`:
```
command -v gh: absent
…
Successfully installed … opendox-0.1.0 …
e8cc902cf58b660669f6b8ffff8349d5781a4b41 # git -C "$W/remote" rev-parse --verify sess-1
1 passed in 1.17s # test_server_unset_submission_factory_binds_the_neutral_default
1 passed in 1.57s # test_a_credential_in_the_remote_url_never_reaches_the_report
9 passed in 6.75s # the five test_submit_route.py nodes (parametrized)
F12.2-submission-half EXIT 0
```
### Mutants: 74 over the code at this head, all killed
**41 over the first head.** One mutant first SURVIVED: `S-gate2 capability dropped`, which kept the actor clause and dropped the `session` capability. `test_a_plane_whose_verdict_says_no_session_refuses_whatever_its_actor` was added for it, and the kill was re-proven at `19b5aba5`:
```
UNMUTATED: 1 passed in 1.74s
MUTATED: capability clause dropped
MUTANT: FAILED tests/test_submit_route.py::test_a_plane_whose_verdict_says_no_session_refuses_whatever_its_actor
```
The other 40, each killed by a named node:
```
S-gate1 loopback clause off | S-gate2 actor dropped | S-gate3 console clause off
S-body read before the gate | S-body problem ignored
S-requested not-a-dict | extra keys | message pick | str check | empty check
S-no port ignored | S-no-target code merged | S-unvetted text logged | S-success body | S-binding method
C-main refusal off | C-report str check | C-report empty check
C-mode always read | C-mode flag dropped | C-mode refusal ignored | C-refusal exit 0 | C-json off | C-binding bypassed
D-no submit verb | D-no submit route | D-no mixin
V-key always present | V-key always true | V-answers method
J-keyed on session | J-empty token | J-proposes main | J-sends main | J-refusal styled as success
J-button stays disabled | J-no token header | J-unoffered mounts | J-composed mounts | A-no mount
```
**10 over lane 3's R1 fixes**, run at `a9616ee4` against `tests/test_cli_branch_actions.py`:
```
MN1 catch-all removed | KILLED …test_a_port_failure_it_did_not_name_is_refused_without_its_text[binding]
MN2 exception text printed | KILLED …test_a_port_failure_it_did_not_name_is_refused_without_its_text[binding]
MN3 type not named | KILLED …test_a_port_failure_it_did_not_name_is_refused_without_its_text[binding]
MN4 unnamed failure exits 0 | KILLED …test_a_port_failure_it_did_not_name_is_refused_without_its_text[binding]
MN5 binding built outside the try | KILLED …test_a_port_failure_it_did_not_name_is_refused_without_its_text[binding]
NM1 hosted not refused | KILLED …test_local_beside_hosted_is_refused_naming_both[hosted]
NM2 any non-local value refused | KILLED …test_local_beside_any_other_value_is_accepted[Hosted]
NM3 value not stripped | KILLED …test_local_beside_hosted_is_refused_naming_both[ hosted ]
NM4 value matched case-insensitively | KILLED …test_local_beside_any_other_value_is_accepted[Hosted]
NM5 flag not required | KILLED …test_without_local_the_install_mode_is_not_read[hosted]
DONE 10 / 10
```
**1 that lane 3 did not reach:** gate clauses 2 and 3 swapped. It was killed by F12.2's own node:
```
FAILED tests/test_submit_route.py::test_submit_route_is_refused_without_a_resolved_actor - AssertionError: {'error': 'agent_invocation', …}
FAILED tests/test_submit_route.py::test_each_refusal_is_made_before_the_body_is_read[no-actor]
2 failed, 49 passed in 24.38s -> KILLED
```
**10 over the review-round guard** (`anotherRepositoryIsActive`, `7dc8214b`), run on an archive of `7dc8214b` against `tests/test_submit_route.py` and `tests/test_web_boundary.py`. Two of them make the node harness throw, so its fixture errors:
```
BASELINE rc=0 | 72 passed in 23.69s
MS1 the predicate is always false | KILLED …test_the_control_is_withheld_only_while_another_repository_is_active (2 failed)
MS2 the predicate is always true | KILLED …test_a_standalone_plane_offers_the_control_as_the_page_derives_it (2 failed)
MS3 no active key counts as another repository | KILLED …test_the_control_is_withheld_only_while_another_repository_is_active (3 failed)
MS4 an empty key counts as another repository | KILLED …test_the_control_is_withheld_only_while_another_repository_is_active (1 failed)
MS5 the comparison is inverted | KILLED 67 passed, 5 errors
MS6 the mount ignores the predicate | KILLED …test_the_control_is_withheld_only_while_another_repository_is_active (2 failed)
MS7 the mount negates it (the e149dc5 shape) | KILLED …test_a_standalone_plane_offers_the_control_as_the_page_derives_it (1 failed)
MS8 the mount compares the branch | KILLED 67 passed, 5 errors
MR7 the shell passes no repository | KILLED …test_web_boundary.py::test_every_web_file_is_classified_exactly_once (2 failed)
MR8 the shell passes the ref as the repository | KILLED …test_the_submit_route_is_addressed_by_the_branch_actions_view_alone (1 failed)
DONE 10 / 10
```
**1 over the admitted account-menu word**, run on an archive of `88b26816`:
```
MA1 the menu omits submit | KILLED …test_the_account_menu_names_submit_where_it_is_granted (1 failed)
```
**11 over the redaction rule and the report checks** (`e7ee97b8`), run on an archive of `e7ee97b8` against `tests/test_cli_branch_actions.py` and `tests/test_submit_route.py`:
```
BASELINE rc=0 | 102 passed in 34.01s
MG1 refusal_text shows the raw message | KILLED …test_a_contributed_refusal_is_redacted_at_the_boundary[fragment] (9 failed)
MG2 no per-URL redaction pass | KILLED …test_a_contributed_report_is_redacted_at_the_boundary (11 failed)
MG3 the free-text pass made stricter (lane 3's MF6 shape) | KILLED …test_a_credential_in_the_remote_url_reaches_neither_report_nor_refusal (6 failed)
MG4 the branch check dropped | KILLED …test_a_report_that_is_not_the_submissions_is_refused[branch-sess-2] (1 failed)
MG5 the ref check dropped | KILLED …test_a_report_that_is_not_the_submissions_is_refused[ref-refs/heads/sess-2] (2 failed)
MG6 the ref check loosened to a suffix | KILLED …test_a_report_that_is_not_the_submissions_is_refused[ref-refs/tags/sess-1] (1 failed)
MG7 the commit check dropped | KILLED …test_a_report_that_is_not_the_submissions_is_refused[commit-ccc…] (3 failed)
MG8 the commit check ignores case | KILLED …test_a_report_that_is_not_the_submissions_is_refused[commit-CCC…] (1 failed)
MG9 the remote is not redacted | KILLED …test_a_contributed_report_is_redacted_at_the_boundary (2 failed)
MG10 the url is not redacted | KILLED …test_a_contributed_report_is_redacted_at_the_boundary (2 failed)
MG11 the URL pattern stops at the query | KILLED …test_a_contributed_refusal_is_redacted_at_the_boundary[fragment] (6 failed)
DONE 11 / 11
```
(Two replaced guards are not counted here. `e149dc56`'s `servesTheActiveRepository` had its 8 mutants killed at `88b26816`, and `7dc8214b` replaced it. `2d64f42e`'s first redaction had its 7 (MX1–MX7) killed at `2d64f42e`, and `e7ee97b8` replaced it.)
### The whole suite, as `validate` runs it
- **At `e7ee97b8`, this head, run locally as `validate` runs it (full11).** The run used `CI=1`, `OPENDOX_TEST_SANDBOX_REQUIRED=1` and `LANG=C.UTF-8`, every `GIT_*` and `XF_*` variable unset, a `postgres:16` service reached through `host.docker.internal`, and the venv built with CI's install command. It reported `5899 passed, 11 skipped, 2 warnings in 3912.08s (1:05:12)`, exit 0.
- **full10 at `e7ee97b8`, the same way, at a load average of about 85:** `1 failed, 5898 passed, 11 skipped` in 2397 s, exit 1.
- **The one failure is a timing ratio this PR does not touch:** `tests_runtime/test_migrations_apply.py::test_the_draft_page_budget_does_not_read_the_bodies_it_sizes`. It needs PostgreSQL's reading to take more than 4 × its sizing, and it measured 9.67 ms sizing against 29.50 ms reading. This PR changes neither that test nor anything under `src/opendox/runtime/`.
- **Re-run serially at a load average of about 125–132.** At this head the node passed 3 times out of 3. On unmodified `main` `6827cafc` it FAILED 3 times out of 3.
- The same measurement, printed, gave sizing/reading here of 4.27/25.24, 6.23/23.23 and 5.54/30.66 ms, and on `main` of 9.36/30.56, 11.57/42.08 and 5.25/23.18 ms. It crosses the 4× bar on both sides.
- So it is a load-induced timing flake outside this PR.
- **SKIPPED stays 11.**
- **At `2d64f42e`:** `1 failed, 5885 passed, 11 skipped` at a load average of about 90, exit 1.
- The one failure was `tests_runtime/test_oidc_verifier.py::test_one_ttl_boundary_causes_one_jwks_refresh_and_not_one_per_waiter`, a wall-clock JWKS-refresh count (`assert 3 == 2`) in code this PR does not touch.
- Run alone at that head it passed 5 times out of 5, and its whole file gave `29 passed`.
- CI's `validate` at `2d64f42e` (run 37874675109) printed `triple: selected=5897 passed=5886 skipped=11 failures=0 errors=0`, with the sandbox's write outside its tmpfs refused.
- **At `7dc8214b`:** `5881 passed, 11 skipped`, exit 0.
- **At `d466f2b9`, after the merge of `main` at `6827cafc`:** `5880 passed, 11 skipped`, exit 0. `7dc8214b` adds one case.
- **At `a9616ee4`, the same way:** `5730 passed, 11 skipped`, exit 0.
- **At `19b5aba5`, before lane 3's R1 fixes:** `5725 passed, 11 skipped`, exit 0. R1's tests add the five cases.
### Files
T015's Files line:
- new `src/opendox/cli_branch_actions.py`
- new `src/opendox/serve_branch_actions.py`
- `src/opendox/default_profile.py` (the first phase-4 edit)
- `src/opendox/serve.py`
- new `src/opendox/web/views/branch-actions.js`
- `src/opendox/web/app.js`
- `src/opendox/web/index.html`
- `tests/fixtures/web_boundary_census.yaml`: the `views/branch-actions.js` row, the app.js and index.html lines, and class A totals of 27 files and 18,912 lines. T104's rows are kept; class C has 14 files and 12,792 lines.
- `tests/test_web_boundary.py`
- new `tests/test_submit_route.py`
- new `tests/test_cli_branch_actions.py`
### Collateral, each admitted by the holder on opensoft/openXfactory#656
- **`tests/test_default_profile.py`** (`6023619783`; docstring `6026622117` item 2). The default's verbs are now `["runtime", "submit"]`, and it declares `HANDLER_CONTRIBUTIONS == (BranchActionRoutes,)`. The facet test's docstring now says so.
- **`tests/test_capability_honesty.py`** (`6027633398`; the helper `6028383410`).
- `GOVERNED` gains `"submit": ("POST", "/actions/session/submit")`.
- `_assert_every_true_flag_answers` is a PROFILE-AWARE EQUALITY with a required `default_profile` keyword: the default profile's map equals `GOVERNED`, and a composed host's map equals `GOVERNED` less `submit`.
- **`tests/test_lens_seed_actions.py`** (`6027633398`). A standalone serve's contributed routes are exactly openDox's submit route, and no seed route.
- **`tests_runtime/test_served_bundle.py`** (`6035791735`; prose `6064770458`).
- `BUNDLE_FILES` goes 42 → 43, with a line naming `views/branch-actions.js`.
- The prose that states the bundle's current count says 43, at lines 9, 38, 50, 417 and 437.
- Two mentions are kept at 42, because they are not the current count. Line 15 is a measurement dated "at openDox-code#69's head" (the tree's 42 beside the wheel's 41). Line 24 is opensoft/openXfactory#1144 10.2's own count.
- No assertion and no tree-to-wheel comparison changes.
- **`src/opendox/web/views/account-menu.js`** (`6069024568` item 2). One word: `"submit"` joins `WRITE_ACTIONS`, so the access line names the verb `actions.submit` grants. The census line count is unchanged at 181.
- **`pyproject.toml:312`** (`6069024568` item 2). One line's present-tense count: "the bundle is 43 files".
### Review rounds on this PR
- **SonarCloud at `a9616ee4`: the quality gate FAILED** on a C reliability rating on new code, with 16 open issues, all in T015's own files. All 16 were fixed in `39a73a33`, with no behaviour changed:
- 1 bug, `javascript:S9383`: the click handler left `submit()`'s promise unhandled. `submit()` settles every outcome itself, so the handler marks it handled with `void`.
- 2 `python:S7632`: the reason after `# noqa: BLE001` moved to the line above.
- 8 `python:S9073`: composite asserts split.
- 3 `python:S5778`: one throwing call per `pytest.raises`.
- 2 `python:S9083`: `@pytest.fixture()` lost its empty parentheses.
- At `39a73a33` the quality gate PASSED with 0 open issues.
- **Copilot at `39a73a33`, HIGH, `app.js:1696`** (thread `4223527699`, "Changes recommended"). FIX NOW under `5988818366`, fixed in `e149dc56`.
- The defect was a misdirected push from one click. With another repository active, the control offered that repository's branch name, while the route pushes from the served checkout (it takes no repository from the request, 12.4a).
- The fix, as corrected by `7dc8214b`: the view withholds the control while an active key names a repository other than `/capabilities.repository`, which is the authority a session verb already refuses a foreign repository against. `app.js` hands the view the active repository.
- Tests: node-harness cases for served, foreign, none-active and undeclared repositories, and a boundary check of the shell. Mutants MS1–MS8, MR7 and MR8 are killed.
- **Codex at `a9616ee4`, P2, `serve.py:664`** (thread `4223387950`): the account menu's access line omitted `submit`. FIX NOW, admitted by `6069024568` item 2 and fixed in `63a12ad4`. Test `test_the_account_menu_names_submit_where_it_is_granted`; mutant MA1 is killed.
- **The merge of `main` at `6827cafc`** (#90) made `opendox.session_pr` re-export the landing seam, whose modules load `yaml`. So importing openDox's default profile loaded `yaml`, through this PR's module-level import in `cli_branch_actions.py`.
- `test_importing_the_default_registers_nothing_and_needs_no_sibling` was red at the merge commit `88b26816`.
- `d466f2b9` imports `session_pr` where it is used.
- **Copilot at `7dc8214b`, HIGH, `cli_branch_actions.py:124`** (thread `4225670374`, "Changes recommended"). FIX NOW under `5988818366`, fixed in `2d64f42e`.
- The defect: a host's contributed port that answered a credential-bearing `url` had it printed by the CLI and answered by the route, bypassing 12.1a.
- The same was true of a host port's refusal text, which is closed too.
- The fix: `submission_object` re-runs `redact_destination` over `url` and `remote`, and `refusal_text` runs `redact_credentials` over every refusal both doors show.
- The proof: five tests were red at `7dc8214b` and are green at `2d64f42e`. Mutants MX1–MX7 are killed.
- **Copilot at `2d64f42e`, HIGH, `cli_branch_actions.py:152`** (thread `4226076943`, "Changes recommended"), together with lane 3's MAJOR at the same head. FIX NOW, fixed in `e7ee97b8`.
- The defect: the refusal redactor spared a bare username for every scheme, so a host port's refusal naming a token as https userinfo kept it. A secret under a query name no pattern knows, or in a fragment, was kept too.
- The fix: `redacted_text` passes every `scheme://` URL through `redact_destination` before the free-text pass. The refusal, `url` and `remote` all go through it.
- Tests: three shapes on the CLI and on both route arms, each asserting the secret gone and the host kept. 18 tests were red at `2d64f42e`. Mutants MG1–MG3 and MG11 are killed.
- **Codex at the later heads:** the Codex trigger comment (WRITER-RULES gate 3) was posted after each push. From about 19:49Z to about 23:23Z the bot answered with its usage limit (`6069024568` item 4). At `7dc8214b` (comment `6072104180`) and at `2d64f42e` (comment `6073019937`) it answered with its usage limit again.
- **At `e7ee97b8`, this head:**
- **Codex**, re-triggered at 13:32Z, reviewed it: "Didn't find any major issues", with Reviewed commit `e7ee97b860` (comment `6082012656`).
- **Copilot** reviewed it with 0 open findings (review `5470807021`).
### Lane 3's review R1, answered
The review is opensoft/openXfactory#656 `6064547745`, partial at `c0fb1dd3`, completed by `6066338657` at `19b5aba5` as GO (PARTIAL). Then:
- **GO at `a9616ee4`**: this PR's comment `6068113766`, with two NITs, both fixed. `pyproject.toml:312` is admitted and moved to 43 (`6069024568` item 2), and T104 is now on the After line.
- **GO (PARTIAL) at `39a73a33`**: the delta is behaviour-neutral (lane 3's coordination log, 2026-10-08 21:07Z).
- **NO-GO (EARLY) at `63a12ad4`** (lane 3's coordination log, 22:01:46Z): 1 MAJOR and 3 NITs, all fixed.
- **MAJOR, `branch-actions.js:37`: the control was offered on no plane. FIX NOW, fixed in `7dc8214b`.**
- The defect: since `e149dc56` the control was offered only where an active key named the served repository. A standalone plane, the one plane that carries `actions.submit`, has no snapshot index (`/snapshot-index.json` answers 404), so no key is ever active there.
- The fix: `anotherRepositoryIsActive` withholds the control only while an active key names another repository, so Copilot's HIGH still holds.
- The test: `test_a_standalone_plane_offers_the_control_as_the_page_derives_it` serves a real standalone plane, and the bundle's own `probeCapabilities` (the token from the URL's fragment), `fetchIndex`, `resolveStoredKey`, `resolveActive`, `isComposed` and `safeKey` derive the mount's arguments as `app.js`'s `render()` does. It was red against `d466f2b9`'s guard: `{'offered': False} != {'offered': True}`. Mutants MS2 and MS7 (the `e149dc56` shape) are killed by it.
- **NIT, the census `app.js` row's note lacked its 1760 → 1764 move.** Fixed in `7dc8214b`.
- **NIT, the After line omitted T104.** Fixed in this body.
- **NIT, the body's class A total.** It now reads 18,912, this head's census figure.
- **GO (EARLY) at `7dc8214b`** (lane 3's coordination log).
- **NO-GO (EARLY) at `2d64f42e`** (lane 3's coordination log, 02:33:37Z): 1 MAJOR, 1 MINOR and 1 NIT, all fixed in `e7ee97b8`.
- **MAJOR, `cli_branch_actions.py:152`: refusal redaction weaker than the report's.** Fixed as Copilot's thread at the same head, above.
- **MINOR, `cli_branch_actions.py:136`: `ref`, `branch` and `commit` passed through raw, and `remote` was redacted only as a whole URL.** Fixed in the holder's stronger form.
- `submission_object(report, branch)` refuses a report whose `branch` is not the submitted one, whose `ref` is not `refs/heads/<branch>`, or whose `commit` is not a full object name (40 hex digits, or 64 in a sha256 repository). The refusal is a fixed sentence that repeats none of the report.
- `remote` gets the text-level redaction.
- Tests cover six malformed reports on the CLI and one on the route. Mutants MG4–MG10 are killed.
- **NIT: the tests spelled credential-shaped URLs whole.** Both test files now assemble them with `test_submission_default.with_userinfo`.
- **GO (EARLY) at `e7ee97b8`** (lane 3's coordination log, 2026-10-09 18:01:21Z): 0 BLOCKER, 0 MAJOR, 0 MINOR, 0 NIT. Lane 3 drove 63 hostile-port checks at every print boundary, with 0 leaks. Its two limits are recorded below, as the holder accepted them.
Each finding is classified under the convergence rule (`5988818366`).
- **MINOR, `cli_branch_actions.py`: a port exception could leak a credential. FIX NOW, fixed in `45c83c7b`.**
- The binding and the act now sit in one `try`. Any exception other than a `SubmissionError` is refused with `UNNAMED_FAILURE`, a fixed sentence naming `type(exc).__name__` alone, with exit 1, as the route answers it.
- New test `test_a_port_failure_it_did_not_name_is_refused_without_its_text[binding|port]`. It was red at `19b5aba5`, where the `RuntimeError` carrying `https://user:S3CRET@…` escaped `cli.main`.
- **NIT, `serve_branch_actions.py:42`: the docstring over-promised. FIX NOW (the docstring), fixed in `45c83c7b`.**
- It now says that the act's own refusal may name the requested `branch` back to the console that sent it, as JSON the view renders as text, and that nothing else a request carried is echoed.
- No limit is accepted. The echo is the caller's own input, behind the three clauses and the console token, rendered with `textContent`. A ref-format pre-check in the route would run git from a module that runs none, and it would still echo every well-formed name.
- **NIT, `cli_branch_actions.py:131`: a malformed install mode was refused. FIX NOW (narrowed), fixed in `45c83c7b`.**
- The contract refuses `--local` "only where it DISAGREES with `OPENDOX_INSTALL_MODE=hosted`". The verb now reads that one value, stripped and case included, as `runtime.config.install_mode` reads it.
- Any other value is accepted (`Hosted`, `Local`, `single-user`), since the verb does not depend on the mode. The old fail-closed test is replaced by `test_local_beside_any_other_value_is_accepted`.
- **NIT, `tests_runtime/test_served_bundle.py:9`: the bundle-count prose still read 42. FIX NOW, fixed in `a9616ee4`, with two lines kept on purpose.**
- Lines 9, 38, 50, 417 and 437 now say 43 (`6064770458`).
- Lines 15 and 24 stay at 42, and the holder accepted that (the ruling relayed to this writer on 2026-10-08 at 19:4xZ). Line 15 is a measurement dated at openDox-code#69's head, the tree's 42 beside the wheel's 41. Line 24 is opensoft/openXfactory#1144 10.2's own count. Moving either would make it false.
- **Lane 3's "NOT REACHED" items, now run:**
- the BUNDLE_FILES bump;
- F12.2 in a fresh venv (above);
- the clause 2/3 swap mutant (killed, above);
- the full suite to its end (above).
### Stated limits
Both are ACCEPTED LIMITS under the convergence rule (`5988818366`), ruled by opensoft/openXfactory#656 `6086098003` item 2. They are recorded here, with no push.
- **(a) `ssh://token@host` and the scp-like `token@host:path` keep the token.** That slot is the ssh login name, which `redact_destination` spares by design, as the neutral port does. Redacting it would erase the routine `git@host` display, and a token there is the host port's own misconfiguration (operator-only).
- **(b) A raw token in a host port's prose, with no URL, passes.** This is the inherent limit of pattern redaction. This PR's guarantee is that a refusal is redacted as strictly as the report, and neither covers a bare secret in prose. Known-prefix redaction is a possible later hardening, outside release 2.
### Not done here
- `opendox land` and its route (T016), which stacks on this PR.
- Lane 3's FORMAL R1-T015 at `e7ee97b8` (its EARLY GO at that head is above).
- The live sandbox is proved by this PR's own `validate` run, not locally: bubblewrap cannot create user namespaces in the local container.
- Postgres container `r2-t015-pg` is removed when T015 closes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Arc: neutral-product-standalone-operability
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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
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.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
Arc: neutral-product-standalone-operability
T011:
SubmissionPort,Submission,LocalGitSubmissions,NoSubmissionTarget(plan 038, P4-A)add-neutral-product-standalone-operability).tests/test_submission_default.pynodes (the credential node here; the server node lands with T014); the newtests/test_submission_port.py.6003486656). Decisions: OQ-12-11, CF-7 (was OQ-12-12) (openDox + openXdox: two open-source layers, an installable app with users, projects and a database; domain descendants pin openXdox (Brett's ruling 2026-09-04) openXfactory#656 comment6013547504).What it adds
session_pr.py, NEW names only, in one delimited block after the existing classes (T012 edits this file next):SUBMISSION_OPERATIONS = ("submit",), the@runtime_checkableSubmissionPortwith one operationsubmit(branch) -> Submission, the frozenSubmission(remote,ref,urlredacted,branch,commit),SubmissionErrorwith its two named failuresNoSubmissionTargetandSubmissionRefused, andLocalGitSubmissions(checkout_root), constructed asGhPullRequestsis.PullRequestPort,PORT_OPERATIONS,GhPullRequestsandFakePullRequestsare untouched;LocalGitSubmissionsis not aPullRequestPort(nopush,open_or_updateorfind_open).submitreturns only on success; every failure raises, redacted.NoSubmissionTarget: no remote; several remotes and none namedorigin(CF-7), naming them.SubmissionRefused:main(R2Q5 (a)); a name that is not a branch name, or a branch that is not there; a remote with no URL; several push URLs (a URL holding a newline counts as two); a push URL that is empty or has surrounding whitespace or a control character (refused, never trimmed); a checkout whose own config names a program git runs; a remote that names a command (<name>::), or a<scheme>://git does not carry itself, which would rungit-remote-<scheme>; a remote named like a git option (--force); afile://URL holding a?or#, which git reads as part of the path; a directory that is not a repository root; a rejected push; a failed transport.origin, else the sole remote of any name (ADV-26).<sha>:refs/heads/<branch>), soSubmission.commitis what was sent. Never--force, never--set-upstream: the checkout's configuration is not written.local_git_adapter.metadata_held_open). A directory inside a repository is refused, as the runtime refuses one.submission_push.redact_destinationis all a report or a message shows of the URL: userinfo and every query and fragment value are replaced, and the scheme, host, port and path stay (a plainsshlogin name,[A-Za-z0-9._-]+, stays too). Text the module did not write (git's stderr, a runtime refusal) is scrubbed of the URL's literal secrets, because git echoes a query string verbatim, and then passed through the package's credential redactor. Of a failed push's stderr, only git'sfatal:anderror:lines and the adapter's timeout line are kept: under the user's ownGIT_TRACE_CURL=1orGIT_CURL_VERBOSE=1the rest is curl's trace of every request header, anhttp.extraheadersecret among them (lane 3's review R1).submission_push.pycarries no push of its own. It builds aPushPlanand hands it torepository_act._push_to_remote_with, which the runtime'spush_to_remotealso uses. So the repository-local command-config refusal (_EXECUTED_LOCAL_KEYS,_refuse_repository_local_command_config),-c protocol.ext.allow=never, the pinned--receive-packwith the destination's hooks off, the descriptor-bound local destination, the bounded, non-interactive push, and a push that sends its refspec and nothing else hold for both. Inrepository_act.py:_mapped_push_plan, which returns the plan;_push_to_remote_with, becausetests_runtime/test_repository_act.py:685andtests_runtime/test_local_git_adapter.py:3058read its source; it now takes the plan;push_to_remotenames a failed push exactly as before;--no-follow-tagsand--no-recurse-submodules. MEASURED on git 2.43.0, exit 0 both times: the checkout'spush.followTags=truealso sent an annotated tag the refspec never named, andpush.recurseSubmodules=onlysent nothing, so aSubmissionnamed a branch that never left. The options outrank both keys andsubmodule.recurse(measured: withsubmodule.recurse=truethe push no longer tries the submodule's remote). The runtime'spush_to_remotegoes through the same core and gains the same guard;_bound_local_destinationgainscontained=True. Only the submission passesFalse: a checkout has no service root, and a bare remote beside it (F12.2's own layout,$W/plainand$W/remote) is the ordinary local remote. The runtime's plan always asks it (a test pinscontained=Trueon the runtime's plan).The falsifier, run (red first)
Before the implementation, at this branch's tests over
main'ssrc:After, at the final head, with
ghhidden fromPATH(CF-8) andCI=true:The credential node pushes for real, over loopback and never the network: the remote is
git http-backendbehind a stdlib server on127.0.0.1, and its URL carries a userinfo secret, atoken=query value and a query value under a name no pattern knows. The branch arrives and the server saw the query, so the remote is measured as PUSHED. The node then drives a rejected push (non-fast-forward), two push URLs, and the same URL with nothing listening. None of the three refusals' messages or formatted tracebacks, norSubmission.urlor the report'srepr, carries any of the three secrets, and the report keeps127.0.0.1:<port>and/remote.git.Mutants: 42, all killed
Each mutant replaces one exact string, runs the named nodes, and restores the file byte for byte.
The whole suite, as CI runs it
CI's
validatejob at the final headeb4976f6(run 37515118652), with T010's sandbox live (OPENDOX_TEST_SANDBOX_REQUIRED=1), read5521 passed, 11 skippedandtriple: selected=5532 passed=5521 skipped=11 failures=0 errors=0.mainis merged in twice:34c2064(T010) at5e3ca9c, which changed only.github/workflows/validate.yml, and84f8ed8(T025) atb954631, which changed four web and test files outside T011's Files. SonarCloud ateb4976f6: quality gate OK, 0 open issues.At the first head
184b8444, CI'svalidatejob (run 37453468885) read5502 passed, 11 skippedandtriple: selected=5513 passed=5502 skipped=11 failures=0 errors=0, the same as a local replica of the job (.[runtime,test]under the constraints file, PostgreSQL 16,CI=true).main's tree read 5458 passed and 11 skipped in that replica. This change adds cases and no skip, soEXPECT_SKIPPEDstays 11, and the floors are not moved here (T017 re-pins phase 4's floors). The runtime's push suites (tests_runtime/test_repository_act.py,tests_runtime/test_local_git_adapter.py) with the new files read277 passedafter the factoring.openXdox-code's protected pin, unchanged and green
tests/test_session_snapshot.py:893-916(test_the_loopback_serve_declares_the_pull_request_port) is in openXdox-code's declared exclusion (doc_health), so it was run composed: openXdox-codemain56e1c23, openxFactory'sscripts/onPYTHONPATH, andopendoxinstalled from this branch.Files changed
src/opendox/session_pr.py: the new names, in one block; one docstring paragraph;__all__.src/opendox/submission_push.py(new): the submission's git half andredact_destination.src/opendox/runtime/repository_act.py:PushPlan,_mapped_push_plan,_push_to_remote_with(git, plan)with--no-follow-tagsand--no-recurse-submodules,push_to_remote's failure naming,_bound_local_destination(contained=…).tests/test_submission_default.py(new): F12.2's credential node, and the fixtures the port tests import.tests/test_submission_port.py(new): every refusal, the redaction table, a linked worktree and its unheld metadata, the checkout's push settings, a failed push underGIT_TRACE_CURL, the length cap, and the factoring.What is NOT done here
submission_factoryand_submission_port, and F12.2's server nodetest_server_unset_submission_factory_binds_the_neutral_default(T014). That node goes beside the credential node and uses the samecheckoutfixture.submitverb, route and view control (T015), and with them the "verb's printed report" half of the credential assertion. Whatsubmitwill print is theSubmission, which this node already asserts on.SubmissionPortin release 2 (R2Q2 (a), R2Q3 (a)).Review R1 (lane 3), folded
Lane 3's read-only review R1 at
2ad92ae9was a GO (opensoft/openXfactory#656 comment6022010349): 0 BLOCKER, 0 MAJOR, 2 MINOR, 2 NIT. All four are folded intod186f6b, on top of the merge ofmain.fatal:anderror:lines are kept.test_a_failed_push_keeps_only_git_s_fatal_and_error_linesreproduces R1's measurement:http.extraheader = X-Api-Key: <secret>,GIT_TRACE_CURL=1, and a loopback server answering 403. It was red first, with the secret in the message, and is green now; mutants M37 and M38 are killed.HTTPS://with a plantedgit-remote-HTTPS(M41). For X5, MEASURED on git 2.43.0: git hands back a worktree's canonical directories even through a symlinked.gitfile orcommondir, so the test supplies the no-follow open'sELOOPfor the worktree's metadata. For X6, MEASURED: plaingit push HTTPS://…ran the planted helper.CI's
validateFAILED atd186f6ba(run 37507020596):1 failed, 5520 passed, 11 skipped. The failure wastests/test_provider_boundary.py::test_the_generic_http_client_has_exactly_its_named_holders, with['submission_push.py: Authorization']: the fold's new comment spelled the HTTP client's auth header by name, and that test holds the name to its declared holders. Fixed ineb4976f, comment only. The test was red locally atd186f6baand is green now, and mutant M42 restores the word and is killed. The same commit clears SonarCloud's twopython:S5778atd186f6ba(tests/test_submission_port.py:314and:401): eachLocalGitSubmissionsis constructed before itspytest.raisesblock.Copilot
Eleven rounds, every thread answered and resolved:
184b8444: a linked worktree's metadata held open (r4194480639); the push URL read exactly, whitespace refused (r4194480699). Both fixed inc0f6c3e.c0f6c3e0: a newline-bearing URL no longer normalized (r4194631880), fixed inb3817d8; the network-destination config race (r4194631803), an accepted limit, below.b3817d8c: no refusal chains git's text into a traceback (r4195368599); an encoded ssh password redacted (r4195368695). Both fixed inbc344bb.bc344bbc: a<scheme>://git does not carry is refused before itsgit-remote-<scheme>helper can run (r4195504431), fixed in3ccf77b, with a remote named like a git option, found in the same pass.3ccf77b7: no inline finding; the overview listed one as previously missed, in unchanged code: the checkout'spush.followTagsandpush.recurseSubmoduleswidened or skipped the push. Classed fix now under the convergence rule (openDox + openXdox: two open-source layers, an installable app with users, projects and a database; domain descendants pin openXdox (Brett's ruling 2026-09-04) openXfactory#656 comment5988818366): ordinary settings, a one-line payload, and a false success report. Fixed ind5aeb49, red first, with mutants M33 and M34 (openDox-code#92 comment6017996427).d5aeb49d: no inline finding; the overview listed one as previously missed: a malformed network URL (https://[bad/repo) is not parsed before the push starts. Ruled an accepted limit by the holder on measurement (openDox-code#92 comment6020383463), below.5e3ca9c2: afile://URL holding?or#was pushed to the pathurlsplitleaves, while git names the literal one (r4197726596). MEASURED on git 2.43.0 with bothremote.gitandremote.git?xpresent: plain git pushed toremote.git?x, andsubmitpushed toremote.gitand reported the?xURL. Fixed in2ad92ae: refused before any push, red first, with mutants M35 and M36. The runtime'spush_to_remotehas read such a URL the same way since § 3.6: openDox creates a repository as a first-class act, with RULING C3's conformant local-git adapter #26, and its containment judges the object it binds; it is left unchanged here and recorded for the holder.2ad92ae9: the checkout's ownpush.gpgSignwithgpg.programcan run a program on a push (r4197922524). A FALSE POSITIVE, corrected by lane 3's review R1:GitRunner._argvpasses-c push.gpgSign=falseon every call, sosubmitnever runsgpg.program. The reply carries the correction; the limit is the opposite one, below.b9546315(the merge ofmain): the same switch seen from the other side, "GitRunner disables required signed pushes" (r4198546517). The declared behaviour is revised and the code is unchanged; accepted limit, below.d186f6ba(the R1 fold): no finding; the overview said only that the description still misstated the signed-push behaviour, which this body corrects.eb4976f6: no finding (review5433258435).Accepted limits, stated
A NETWORK destination is pushed by remote name, so git re-reads the checkout's own config at push time, after the submission judged it. This is the runtime's push core as it stands (
push_to_remotehas the same window). Naming the URL on the command line would put a credential-bearing URL in argv, and a-corGIT_CONFIG_*override adds to the multi-valuedurlandpushurlkeys rather than replacing them. A config change in that window needs a concurrent writer to the user's own.git/config, who already decides what every other git command the user runs executes; the submission runs as the user and crosses no privilege boundary. The command-config and command-transport refusals stop such a config only when it is already there, not one written during the window.submitinherits the push core's non-interactive contract: no prompt,GIT_TERMINAL_PROMPT=0, empty askpass, andGIT_SSH_COMMAND=ssh -o BatchMode=yes -o StrictHostKeyChecking=yes, which overrides an ambientGIT_SSH_COMMANDorcore.sshCommand. Credentials come from a credential helper in the global or system config, an ssh agent or default key, or.netrc.A credential helper (or another key on the runtime's list of keys git executes) set in the checkout's OWN config is refused by name, with the remedy; one in the global config is used. The
gpgkeys are not on that list (below).Neither the checkout's
pre-pushnor a local destination'spre-receiveruns.A local destination is pushed through its open descriptor, so no remote-tracking ref is updated for it; a network destination is pushed by remote name, as git does.
A remote defined only by a legacy
.git/remotes/<name>file has noremote.<name>.urland is refused as naming no URL.A held secret shorter than four characters (
_SHORTEST_SCRUBBED) is not scrubbed out of git's text literally; the pattern redactor still runs over it. So a short query value,ticket=abcfor example, survives in aSubmissionRefusedwhen git echoes the URL. Copilot raised this as r4198584579 on T014's openDox-code#93 (submission_push.py:454), and the holder ruled it an accepted limit (openDox-code#92 comment6023299792). A value under four characters is not a credential, and the threshold exists to prevent over-redaction.A submission is ALWAYS UNSIGNED, so a remote that requires signed pushes refuses it (a named
SubmissionRefused).GitRunner._argvpasses-c push.gpgSign=falseon every call (local_git_adapter.py:692-694, pinned bytests_runtime/test_local_git_adapter.py:3470-3530), so the checkout's ownpush.gpgSignandgpg.programnever run a program here. Lane 3's review R1 measured this at2ad92ae9: with both set and a local remote advertising signed push, plaingit pushran the program, andsubmitdid not and pushed unsigned. A caller-scoped way to keep signing is not added, because it would hand the repository's chosen program back to this process (Copilot r4197922524, a false positive, and r4198546517).The module's "refuse before the push" does not cover a malformed NETWORK URL:
_destination_as_a_local_pathparses onlyfile://, sohttps://[bad/reporeaches git, which refuses it at push time, before any connection (Copilot review5429620931; ruled an accepted limit on measurement). MEASURED on git 2.43.0:No ref moves, and no destination is reached: curl rejects the URL as it parses it, so there is no remote to move. The scrub over-redacts the end of git's sentence after the token, and nothing leaks.
🤖 Generated with Claude Code