Skip to content

T012 + T013: the landing seam, governance, confirmation and the neutral lander; feature 007's guard admits the landing's fast-forward (plan 038) - #90

Merged
brettheap merged 14 commits into
mainfrom
r2/t012-landing-seam
Oct 8, 2026
Merged

brettheap merged 14 commits into
mainfrom
r2/t012-landing-seam

Conversation

@brettheap

@brettheap brettheap commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

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.

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):

$ 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:

$ 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:

$ 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

…al lander; feature 007's guard admits the landing's fast-forward (plan 038)

T012 (#1144 12.6a part, 12.6 part; spec FR-006, FR-007):
- new landing.py: LandingPort (one operation, land), Landed, MergeConflict,
  LandingRefused; repository_governance / read_governance answering
  standalone, governed or unknown, failing closed: no main is unknown
  (R2Q7 (a)); a registered host profile decides whatever any file says
  (R2Q4 (a)), through its SUBMISSION_INSTRUMENT facet; otherwise
  .opendox/governance.yaml read from the blob at main's tip (N-1), with
  standalone only on the explicit local install (--local or
  OPENDOX_INSTALL_MODE=local); no declaration refuses naming the exact
  file and content.
- the neutral lander: ls-remote refs/heads/main first (a remote with no
  main passes, N-16); a dirty served checkout on main refused before
  merging (ADV-08); the --no-ff merge in its own detached landing
  worktree under <repo>-worktrees/landing/ with rerere off; then
  merge --ff-only of a clean served checkout on main, or a
  compare-and-swap of the main ref when it holds another branch (left);
  pushes nothing (R2Q6 (a)). bound_lander and request_landing route by
  governance; under governed with an instrument the confirmed branch is
  submitted through it and nothing merges.
- new landing_confirm.py: the confirmation capability, bound to the branch
  and its head, single-use, minted only by the /dev/tty prompt and the
  server's per-branch nonce.
- session_pr re-exports LandingPort and repository_governance.
- the audit of every place openDox creates a repository: the two
  conformance-corpus `git init`s now pin --initial-branch=main;
  authoring.py and runtime/repository_act.py already named their branch.
- tests/test_landing_guardrails.py: F12.2's thirteen nodes, R2Q7 (a)'s two,
  ADV-08's, the lander's mechanics and the audit.

T013 (#1144 12.6a part; R2Q6 (a)'s four exceptions to feature 007):
- session_git.py: the name-only allowlist is unchanged and merge stays off
  it; an argument check admits exactly `merge --ff-only <full commit id>`
  at the served root, for a clean checkout holding main, read from git by
  the guard immediately before the move; fast_forward_served issues it.
- tests/test_session_git.py: ("merge", "other-branch") still refused; the
  merge-absence pin moves to the admitted form; the admission's refusals.

Refs openxFactory#656 6003486656, 6013547504.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 6, 2026 10:27
@sourcery-ai

sourcery-ai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Reviewer's Guide

The PR adds a fail-closed, governance-aware landing protocol backed by opaque human confirmation and a neutral --no-ff lander, then extends SessionGit with one state-checked fast-forward exception so only the intended served checkout move is possible; it also pins product-created repositories to main and supplies extensive guardrail and mutation coverage.

Sequence diagram for confirmed standalone landing

sequenceDiagram
    participant User
    participant Interactive as Interactive layer
    participant Lander as NeutralLander
    participant Confirm as landing_confirm
    participant Governance as repository_governance
    participant Git as SessionGit

    User->>Interactive: confirm_at_terminal(branch, head)
    Interactive->>Confirm: confirm_at_terminal(branch, head)
    Confirm-->>Interactive: Confirmation
    Interactive->>Lander: land(branch, confirmation)
    Lander->>Governance: read_governance(checkout_root)
    Governance-->>Lander: standalone
    Lander->>Confirm: redeem(confirmation, branch, head)
    Confirm-->>Lander: confirmation spent
    Lander->>Git: ls-remote refs/heads/main
    Lander->>Git: worktree add --detach landing worktree
    Lander->>Git: merge --no-ff branch
    Git-->>Lander: merge commit
    Lander->>Git: fast_forward_served(merge commit)
    Git-->>Lander: updated main
    Lander-->>Interactive: Landed
Loading

State diagram for landing governance outcomes

stateDiagram-v2
    [*] --> Validate
    Validate --> Unknown: no main or invalid checkout
    Validate --> Install: repository valid
    Install --> Unknown: install mode unresolved
    Install --> Host: mode resolved
    Host --> Governed: registered host
    Host --> Declaration: no registered host
    Declaration --> Standalone: standalone declaration and local install
    Declaration --> Governed: governed declaration
    Declaration --> Unknown: absent, invalid, or mode disagreement
    Standalone --> NeutralLander: bind_lander
    Governed --> InstrumentRoute: instrument available
    Governed --> Refused: no instrument
    Unknown --> Refused
    InstrumentRoute --> Submitted: submit(branch)
    NeutralLander --> Refused: landing guardrail fails
    NeutralLander --> Landed: confirmed no-ff merge succeeds
    Submitted --> [*]
    Landed --> [*]
    Refused --> [*]
Loading

Flow diagram for the SessionGit fast-forward exception

flowchart TD
    Start[SessionGit command] --> Match{Exactly merge --ff-only full commit?}
    Match -->|No| Allowlist{Named allowlist command?}
    Allowlist -->|Yes| Allow[Allow]
    Allowlist -->|No| Refuse[Refuse]
    Match -->|Yes| Root{Served checkout root?}
    Root -->|No| Refuse
    Root -->|Yes| State[Read branch and git status]
    State --> CleanMain{Clean checkout on main?}
    CleanMain -->|No| Refuse
    CleanMain -->|Yes| Move[Execute fast-forward]
    Move --> Done[Served checkout updated]
Loading

File-Level Changes

Change Details Files
Introduce a governance-aware landing seam with explicit confirmation, neutral merge mechanics, and refusal paths.
  • Add the one-operation LandingPort, result and refusal models, governance query, routing, and standalone neutral lander.
  • Resolve governance fail-closed from repository shape, install mode, registered host precedence, and main-tip declaration content.
  • Require branch/head-bound single-use confirmations from terminal or server nonce issuers, and restrict issuer access to interactive layers.
  • Perform conflict-preserving --no-ff merges in disposable detached worktrees, validate remotes, reject dirty or conflicting main ownership, and advance local main without pushing.
  • Re-export the landing seam through the session PR API.
src/opendox/landing.py
src/opendox/landing_confirm.py
src/opendox/session_pr.py
Extend the session Git guard with the narrowly scoped fast-forward admission required by landing.
  • Keep merge absent from the name allowlist and admit only merge --ff-only <full-commit-id> at the served repository root.
  • Re-read branch and porcelain cleanliness immediately before the move, requiring a clean served checkout on main.
  • Expose fast_forward_served for the lander's final move while continuing to reject alternate merge spellings, short IDs, subdirectories, and other branches.
src/opendox/session_git.py
tests/test_session_git.py
Ensure product-created repositories explicitly use main regardless of ambient Git configuration.
  • Pass --initial-branch=main for populated and empty conformance corpus repositories.
  • Add static and ambient-configuration coverage for all repository creation sites.
src/opendox/conformance_corpus.py
tests/test_landing_guardrails.py
Add comprehensive guardrail coverage for governance, confirmation, landing mechanics, and repository safety.
  • Test the thirteen F12.2 guardrails plus no-main, missing-declaration, dirty-checkout, host precedence, declaration validation, confirmation capability, remote checks, worktree ownership, race handling, conflict behavior, revertability, and no-push guarantees.
  • Use real scratch repositories and static source audits to verify command routing, issuer restrictions, merge argument admission, and repository initialization.
tests/test_landing_guardrails.py

Tips and commands

Interacting with Sourcery

  • 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!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Checkout races can invalidate landing safety checks, while governance and conflict handling have unresolved correctness issues.

Review effort: Balanced
Findings: 3 High severity · 3 Medium severity

Open (6)
What changed in this PR

Adds governance-aware, explicitly confirmed branch landing to openDox’s session workflow, separating standalone merges from host-controlled submission.

Changes:

  • Introduces landing interfaces, governance checks, and single-use confirmation tokens.
  • Adds detached-worktree merging and a narrowly guarded served-checkout fast-forward.
  • Pins corpus repositories to main and expands safety coverage.
File Description
tests/​test_session_git.py Tests fast-forward admission and refusal cases.
tests/​test_landing_guardrails.py Covers governance, confirmation, landing mechanics, and repository initialization.
src/​opendox/​session_pr.py Re-exports the landing interface and governance query.
src/​opendox/​session_git.py Adds the argument-checked fast-forward exception.
src/​opendox/​landing.py Implements governance routing and standalone landing.
src/​opendox/​landing_confirm.py Provides terminal and nonce-based confirmation capabilities.
src/​opendox/​conformance_corpus.py Explicitly initializes corpus repositories on main.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/session_git.py Resolved
Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing.py Resolved
…ers a conflict or redirects a fast-forward; the parser and the host check fail closed (plan 038)

Copilot's review of #90 at 5dabcea, all six fixed:
- r4194244263: an in-tree `merge=union` resolved an overlapping edit into a
  clean merge (measured). The landing merge now takes .gitattributes and
  the global attributes file out (`--attr-source=<empty tree>`,
  `core.attributesFile=/dev/null`), refuses before merging where this
  machine's own attributes still select a driver, and names git's own
  strategy (`--strategy=ort`), since `pull.twohead=ours` would drop the
  branch with no conflict.
- r4194244345: the holder of `main` is read again before the ref-only
  update of a `left` landing.
- r4194244373: the served fast-forward verifies where it landed and
  refuses, never reporting `main` landed, when the checkout was switched
  between the guard's reads and the merge. Measuring it showed more:
  under `pull.twohead=ours` or `branch.main.mergeOptions=-s ours` (or
  `-s subtree`) a bare `git merge --ff-only <descendant>` exits 0 having
  made a NEW merge commit. The admitted argv now pins both settings
  (`-c pull.twohead=ort -c branch.main.mergeOptions=`), and nothing else
  is admitted.
- r4194244409: every PyYAML failure (a NUL at loader construction, an
  impossible date, deep nesting) is an invalid declaration, not a raise.
- r4194244449: openDox's default profile is no host only where an entry
  point registered it (provenance, `domain_profile._is_default`).
- r4194244502: `MergeConflict` only with unmerged paths; a merge git could
  not commit (a refusing hook) keeps its `merge-failed` and git's words.

SonarCloud: the cognitive complexity of read_governance and the remote
check split into steps; session_git's two repeated literals are named
constants; the tests hold one throwing call per `pytest.raises` and no
composite assertion.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 6, 2026 10:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/session_git.py Resolved
Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing_confirm.py Resolved
…lacement answers a conflict; main moves only with a working tree that holds it; the served fast-forward is FR-004a's three arguments (plan 038)

Copilot's second review of #90, and T008's landed text (codeXfactory/codeXfactory#515, merge f1b019fe: FR-004a exception 1 admits exactly the three arguments `merge --ff-only <commit>`).

- landing.py: the landing merge pins `merge.default` to a fresh driver name and `merge.directoryRenames=conflict` (measured on git 2.43: `merge.default=union` and `merge.directoryRenames=true` each turned a conflict into a clean merge; an empty `merge.default` is answered by `merge..driver`, and `text` by `merge.text.driver`). A `merge=text` or `merge=binary` attribute is a lookup by name, so it is refused like any configured driver. A conflict's paths are read NUL-delimited. Where the served checkout holds another branch, the landing worktree takes `main` (git refuses that while another working tree holds it, and refuses `main` to every other one meanwhile), checks the tip, and fast-forwards it there; `main` is never moved by its ref alone. On the instrument route, the head is read again immediately before `submit`.
- landing_confirm.py: a nonce that is not an ASCII str is `nonce-mismatch`, never a UnicodeEncodeError.
- session_git.py (T013): the guard admits exactly `merge --ff-only <full id>`, three arguments; `pull.twohead` and `branch.main.mergeOptions` are pinned in that command's environment by the funnel (measured: `-s ours` made a new merge commit, `--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.
- tests: 73 in test_landing_guardrails.py and 97 in test_session_git.py, all passing; 63 of 63 mutants killed.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing_confirm.py Resolved
Comment thread src/opendox/session_git.py Resolved
brettheap and others added 3 commits October 6, 2026 16:06
… out of argv; credentials and control characters never reach a refusal; a discarded confirmation leaves no record (plan 038)

Copilot's third review of #90, and the holder's push-URL rule for T012 (plan 038, coming in openxFactory#1245).

- landing.py: the remote check reads the remote's push URL with `git remote get-url --push --all <remote>` (the fetch URL where no `pushurl` is set). It refuses a remote with several push URLs by name (`several-push-urls`). It then probes that URL through a transient remote passed in the command's environment, so the URL never reaches git's argv. `_redact` runs the runtime's `redact_credentials` first, which knows the fragment form (`#token=`) and a value after whitespace (`?token= secret`). A conflict path or a driver entry with a control or format character is shown escaped in the refusal, and `paths` keeps the name itself.
- session_git.py: `SessionGit.ls_remote_url(cwd, url, ref)` runs `git ls-remote opendox-probe-<hex> <ref>` with `remote.<transient>.url` in `GIT_CONFIG_COUNT=1`.
- landing_confirm.py: a token's record is dropped when the token is gone (`weakref.finalize`), and a spent token still held is still refused as spent.
- tests: test_the_remote_check_reads_the_push_url_not_the_fetch_url, test_the_push_url_never_reaches_git_argv, test_a_credential_in_the_push_url_never_reaches_a_refusal (both forms), test_a_conflict_path_cannot_write_to_the_terminal, test_a_driver_refusal_cannot_write_to_the_terminal and test_a_discarded_confirmation_leaves_no_record. The two files read 177 passed, and 70 of 70 mutants are killed.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…and `several-push-urls` (plan 038)

Docstring only. The module docstring now describes the remote check as it runs since round 3:
- `main` is read at the remote's push URL (`git remote get-url --push`), through a transient remote passed in the command's environment;
- several push URLs are refused.

`LandingRefused`'s code list gains `several-push-urls`.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@brettheap
brettheap requested a balanced review from Copilot October 6, 2026 17:27
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing_confirm.py Resolved
Comment thread src/opendox/session_git.py Resolved
… URLs are read as spelled; names that reorder text are shown escaped; branch_sha reads the exact ref (plan 038)

Copilot's fourth review of #90.

- landing.py:
  - the landing worktree's checkout, the merge and the `switch` run with `core.hooksPath=/dev/null`. A hooks path inside the tree (husky's `.husky`) is the branch author's to write, and a `post-merge` hook that pushed would publish a landing that reports `pushed=False`;
  - the working tree's top and the push URL are read with `git_raw`, so a trailing space survives;
  - the dirty-checkout refusal shows each status line through `shown()`.
- session_git.py (T013):
  - `SERVED_FAST_FORWARD_SETTINGS` gains `core.hooksPath`, so both fast-forwards run with no hook while the argv stays the three arguments FR-004a admits;
  - `shown()` moves here and `_fast_forward_refusal` uses it;
  - `checked_out_at` reads the path as spelled;
  - `branch_sha` runs `show-ref --verify --hash`, so a tag `backup/refs/heads/main` no longer adds a second line.
- landing_confirm.py: the prompt shows a branch name that holds a bidi override escaped, and the answer must still be the exact name.
- tests: 9 new cases, and two hook-based cases reworked (`merge.verifySignatures`; a runner that moves `main`). The two files read 185 passed, and 81 of 81 mutants are killed.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Unresolved guard and filter-execution issues can violate landing safety guarantees.

Review effort: Balanced
Findings: 2 High severity

Open (2)
Resolved since last review (6)
Previously missed (2)

In code that hasn't changed since last review

Medium severity Escape branch names in all user-facing messages

src/​opendox/​landing.py:274

Conflict paths are escaped, but the branch is still raw in the heading and remedy. A legal name such as sess\u202e1, already exercised by the prompt test, can visually reorder this refusal. The same omission affects the driver, merge-failure, parent-check, already-landed and stale-confirmation messages, branch-derived worktree paths, the generated merge audit message, and session_git.fast_forward_served()'s displayed ref. Apply shown() consistently to these display values while preserving raw names for Git operations and structured fields. Add bidi-branch regressions for these outputs; protecting only the confirmation prompt and conflict paths leaves these later displays unsafe.

Medium severity Report unverifiable fast-forwards without claiming no changes

src/​opendox/​landing.py:942

fast_forward_served() can raise from its post-check after the merge has advanced main, for example if the checkout switches after the merge completes but before verification. This handler then incorrectly says main is unchanged and nothing landed. The acknowledged checkout race does not justify that guarantee. Report that the operation could not be completed or verified, and ask the user to inspect main and the served checkout before retrying. Cover a post-check failure after a successful fast-forward.

Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/session_git.py Resolved
brettheap and others added 4 commits October 6, 2026 22:04
…ion_pr re-exports sit beside T011's names

The one conflict was src/opendox/session_pr.py. T011's submission-port block comes first, then the landing seam's re-export of LandingPort and repository_governance from opendox.landing. __all__ names both groups.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…urn or a non-UTF-8 name reaches the guards as git wrote it (plan 038)

Copilot 4195681954, fixed by holder ruling openxFactory#656 `6026275158` item 1.

- session_git.py (T013):
  - new `SessionGit.git_nul(cwd, *args)`. It runs the command with `binary=True`, so stdout comes back as bytes, then splits on NUL and decodes each field UTF-8 with `surrogateescape`, with no newline translation;
  - `SubprocessGitRunner.run` takes `binary`;
  - text mode now decodes with `errors="surrogateescape"`, so a non-UTF-8 name in a command's own output (`Auto-merging <name>`) no longer raises.
- landing.py:
  - the changed paths, the `check-attr` fields and a conflict's paths are read through `git_nul`. Before, `car\rriage.md` was read as `car\nriage.md`, so the merge-driver check asked about a path no attribute names, and the merge then ran the driver set for the real one;
  - `_redact` spells a surrogate as an escape, so every message can be printed.
- tests:
  - the conflict-path regression gains a CR-bearing name and a non-UTF-8 name (where the filesystem takes one);
  - new `test_a_driver_set_for_a_name_with_a_carriage_return_is_refused` and `test_nul_delimited_fields_are_read_as_git_wrote_them`;
  - the two files read 188 passed, and 85 of 85 mutants are killed, including the one that reads these fields in text mode.
- session_git.py, from Copilot's fifth review (4199664668): the served checkout's `HEAD` ref is read exactly as git wrote it, with only its newline removed. A stripped read took the legal branch `main\u00a0` for `main`, so the guard admitted a fast-forward of another branch. Regression: `test_a_branch_whose_name_only_looks_like_main_is_never_fast_forwarded`.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing_confirm.py Resolved
Comment thread src/opendox/session_git.py Resolved
Comment thread src/opendox/session_git.py Resolved
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-3 (openXfactory-3)

REVIEW R2 of T012 + T013 at 093bc9c4: NO-GO. It found 6 issues: 1 BLOCKER, 1 MAJOR, 3 MINOR and 1 NIT.

This was lane 3's read-only review (claim 6016375181). It started early, on Brett Heap's word "start the #90 review now", and the holder asked that its findings be handled like Copilot's. Every case below was measured at 093bc9c4 through NeutralLander.land with a LandingNonces token. Lane 3 edits nothing here. The holder decides what its writer fixes.

BLOCKER, src/opendox/landing.py:899: branch.HEAD.mergeOptions reaches the landing merge.

  • The defect. The landing merge runs on a DETACHED HEAD, and on a detached HEAD git applies branch.HEAD.mergeOptions.
  • Case 1. One line, git config branch.HEAD.mergeOptions "-X theirs", makes a conflicting branch land. Main has "MAIN" in f.txt and the branch has "BRANCH". The result is Landed(fast-forwarded), main holds "BRANCH", and no MergeConflict is raised.
  • Case 2. With "-s ours" instead, git tries ours before the explicit --strategy=ort. Main's tree lands, the branch's change is dropped, and Landed is still reported, because the parents are [main, head] and so the parents check passes.
  • Control. With no configuration, the same repository refuses with merge-conflict.
  • Why the suite misses it. F12.2's test_no_configuration_enables_automatic_landing sets branch.main.mergeOptions (tests/test_landing_guardrails.py:457), which never reaches a detached merge. Add ("branch.HEAD.mergeOptions", "-X theirs") to its walk and it FAILS at this head ("DID NOT RAISE MergeConflict", :475).
  • FIX. Add "-c", "branch.HEAD.mergeOptions=" to the merge argv beside merge.directoryRenames. Verified: both cases then refuse with merge-conflict. Add that key, as both -X theirs and -s ours, to the configuration walk and to test_a_configured_fallback_driver_cannot_resolve_a_conflict's parameters.

MAJOR, src/opendox/landing.py:863: the driver refusal misreads string attribute values.

  • The defect. The refusal treats check-attr's words set, unset and unspecified as git's own states. But check-attr prints the same words for the STRING values merge=set, merge=unset and merge=unspecified, and ll-merge looks a string value up among the configured drivers first.
  • Case. .git/info/attributes holds f.txt merge=set, and git config merge.set.driver "cp %B %A" is set; unset and unspecified behave the same way. There is no merge-driver refusal, the driver answers the conflict, and the result is Landed(fast-forwarded) with the branch's side.
  • This is the same shape as the PR's own refused merge=text plus merge.text.driver case (test parameter 3).
  • FIX. Pin -c merge.set.driver=false -c merge.unset.driver=false -c merge.unspecified.driver=false in the landing merge. A driver that exits non-zero leaves a conflict. Verified: all three spellings refuse with merge-conflict, and the existing driver, fallback and merge-attribute tests stay green (10 passed). Add one parametrized case per word.

MINOR, src/opendox/landing.py:788: an ignored local file can be overwritten.

  • The defect. "Clean" is status --porcelain --untracked-files=all, which leaves out IGNORED files, and git merge --ff-only overwrites an ignored file by default.
  • Case. Main ignores local.env, and the user holds local.env = "SECRET=…" (status reads ''). The branch commits local.env. land returns Landed(fast-forwarded), and the served local.env now holds the branch's content. The user's file is gone, with no word.
  • Why it matters. FR-004a exception 4 admits that path's write, but ADV-08's refusal, which keeps local state from being destroyed, is skipped for a path the branch author chooses.
  • FIX. Before the served fast-forward, refuse, naming the remedy, when the served checkout's ignored files (git ls-files -z --others --ignored --exclude-standard) include a path that git diff --name-only -z <main> <merge commit> names, or sit under one.

MINOR, src/opendox/session_git.py:430: the guard is wider than FR-004a's one act.

  • The defect. FR-004a scopes the four exceptions to ONE act: a confirmed landing, fast-forwarding to "that merge commit". The guard admits merge --ff-only <any full id> for EVERY SessionGit caller, with no confirmation and to any descendant commit.
  • Today it holds by accident. Only landing.py:938 and :980 issue it (checked by grep), but no test pins that. A later product path that calls fast_forward_served(sha), such as the fix loop or a gate verb, would move the served checkout with no human act, and the suite would stay green.
  • FIX. Add a static node beside test_only_the_interactive_layers_call_an_issuer: no module but opendox/landing.py names fast_forward_served or SERVED_FAST_FORWARD_ARGV.

MINOR, src/opendox/landing.py:860: an older git is not refused by name.

  • The defect. data-model.md § Landed says an older git is "refused by name". On a git without --attr-source, land raises a raw opendox.session_git.GitError ("unknown option: --attr-source=…", exit 129), not a LandingRefused with a code T016's routes can map.
  • The code's own comment at :171 says --attr-source needs git 2.42, while the plan's stated floor is 2.31.
  • Simulated with a PATH wrapper that rejects --attr-source: it fails closed (main unmoved, worktree removed), but the refusal is unnamed.
  • FIX. Catch GitError around _attribute_neutral and _refuse_merge_drivers, raise LandingRefused(code="merge-failed") naming the git floor, and add a test with a runner that refuses --attr-source.

NIT, tests/test_landing_guardrails.py:703: the static issuer check can be satisfied dynamically.

  • issuer_reaches returns [] for getattr(lc, "confirm_" + "at_terminal")("b", "h"), and for importlib.import_module("opendox.landing_confirm") followed by getattr(m, "".join(["_", "LIVE"])). Implicit concatenation such as "_mi" "nt" is caught.
  • 12.6a's stated in-process limit covers deliberate code, so this matters only for an accidental reach.
  • FIX (optional hardening). Refuse any module outside landing.py and the two layers that names landing_confirm, as an import or a string, and pin landing.py's import of it to Confirmation, ConfirmationRefused, redeem.

CHECKED OK at 093bc9c4.

  • The holder's ruling 6026275158, item 1 (Copilot 4195681954), is fixed.
    • SubprocessGitRunner.run(binary=True) captures bytes, and git_nul decodes with surrogateescape.
    • Three regression tests cover it: CR, LF and a non-UTF-8 name; a driver set for a name holding a CR; and a conflict naming its paths as spelled.
    • A mutant that restores text mode is killed by each of them.
    • Reading 6 holds.
  • The holder's ruling 6026622117, item 1 (Copilot 4199664554, filters). The reasoning holds: the filter command comes from configuration, and the merge runs with an empty --attr-source. Not re-raised.
  • merge.default=union is pinned to a fresh driver name. Mutants that remove the pin, or remove --attr-source, are killed. merge.directoryRenames is pinned, and a rename/rename stays a conflict.
  • The ff-only guard. 14 argv spellings were probed, and only merge --ff-only <40 or 64 lowercase hex> at the root on a clean main is admitted. merge.ff=false does not beat --ff-only. pull.twohead, branch.main.mergeOptions and core.hooksPath are pinned. An ambient GIT_CONFIG_PARAMETERS or GIT_CONFIG_COUNT is stripped.
  • The confirmation capability.
    • Direct construction, object.__new__, a subclass, copy, deepcopy and pickle are each refused.
    • A token is single-use, because the registry pop runs under a lock.
    • The token's binding is read from the registry.
    • A nonce is single-use per branch.
    • The prompt reads /dev/tty only, with no bypass flag.
  • The governance query.
    • Its order: repository, main, install mode, host (with an instrument, without one, or failed to load), then the declaration in main's blob.
    • The YAML is read strictly, with duplicate and merge keys refused, an int schema_version, a 4096-byte cap and a regular file only.
    • The same main sha is used for the read, the merge and the move.
  • T013's contract. ("merge", "other-branch") is still refused, and the code matches the four FR-004a exceptions as landed in codeXfactory/codexFactory#515 at f1b019fe.
  • Files and cites are in scope and accurate.
  • The suite. tests/test_landing_guardrails.py and tests/test_session_git.py: 188 passed (git 2.43.0, Python 3.12.3).

NOT REACHED.

  • The full suite and CI at this head. Copilot has not reviewed 093bc9c4.
  • The PR's own 85 mutants; only the reviewer's 6 were run.
  • Other git versions; the old-git case is simulated.
  • A url.insteadOf double rewrite, and repo-local core.sshCommand on land's ls-remote, where T011's refusal is not applied.
  • merge.renormalize with core.autocrlf, SHA-256 repositories, and T016's surface.

VERDICT: NO-GO. One configuration line, branch.HEAD.mergeOptions, lets the landing merge answer a conflict for the human, or drop the branch while reporting Landed, and F12.2's own configuration-walk node misses it. The fix is one pinned -c plus the matching test cases.

brettheap and others added 2 commits October 8, 2026 17:48
…3bc9c

Copilot's sixth review of openDox-code#90 (9 threads, all fixed):
- a push URL naming a helper transport (`<name>::`, or a scheme git does
  not carry) is refused before anything runs (`remote-transport`), and the
  probe's environment admits only git's own transports
  (`GIT_ALLOW_PROTOCOL`), so a second `insteadOf` rewrite runs no helper;
- a refusal removes every value the push URL carries, by value
  (`submission_push._scrubbed`), and keeps only git's `fatal:`/`error:`
  lines of a failed probe (no curl trace headers);
- the probe never waits on a human or a stalled remote: the runtime's
  non-interactive environment (`GIT_TERMINAL_PROMPT=0`, no askpass, ssh in
  batch mode) and a bound (`PROBE_TIMEOUT`);
- the push URL is read as bytes and no record is dropped, so a URL holding
  a newline is refused, never probed in part;
- the top of the working tree is asked of git (inside a work tree, empty
  prefix), never compared as a path;
- a branch name is shown escaped in every message naming it;
- the binding refuses only an empty branch name (a legal name may end in a
  no-break space);
- `git_nul` runs through the funnel, so the fast-forward's pins apply to it.

Lane 3's review R2 (6035652847; holder ruling 6035797819), findings 1-5:
- the landing merge pins `branch.HEAD.mergeOptions` empty (it runs on a
  detached HEAD, where `-X theirs` answered a conflict and `-s ours` dropped
  the branch);
- drivers named `set`, `unset` and `unspecified` are pinned to fail, since
  `check-attr` cannot tell those string values from git's own states;
- the served fast-forward is refused when the served checkout holds an
  ignored file where the landing writes (`ignored-files-in-the-way`);
- a static node holds the served fast-forward to the lander;
- a git without `--attr-source` is refused by name (`merge-failed`, naming
  git 2.42).
Finding 6 is an accepted limit (6035797819).

Mutants: 106 of 106 killed.

Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Oct 8, 2026

Copy link
Copy Markdown

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

Answer to lane 3's review R2 (6035652847) of T012 + T013 at 093bc9c4. Findings 1 to 5 are fixed in ff6f1cb, and finding 6 is an accepted limit; both follow holder ruling openxFactory#656 6035797819. The PR head is now 4527432, which merges main 99220883.

At 4527432:

  • the full suite in CI form: 5795 passed, 11 skipped;
  • tests/test_landing_guardrails.py and tests/test_session_git.py: 218 passed;
  • mutants: 106 of 106 killed, where a kill means a test failed (pytest exit 1).

1. BLOCKER, branch.HEAD.mergeOptions: FIXED.

  • The landing merge pins -c branch.HEAD.mergeOptions=, beside merge.directoryRenames.
  • Both spellings, -X theirs and -s ours, are added to F12.2's test_no_configuration_enables_automatic_landing. The conflict is still shown with its path, and a clean landing is still a two-parent merge that carries the branch's file. The -s ours case is the one that caught the silent drop.
  • Both are also cases of test_a_configured_fallback_driver_cannot_resolve_a_conflict (detached-head-theirs and detached-head-ours).
  • Mutant Q1, the pin removed, is killed.

2. MAJOR, string values set, unset and unspecified: FIXED.

  • _STATE_NAMED_DRIVERS_FAIL pins merge.set.driver, merge.unset.driver and merge.unspecified.driver to false. A driver that fails leaves the path conflicted.
  • test_a_driver_named_like_one_of_git_s_own_states_cannot_resolve_a_conflict[set|unset|unspecified] sets doc.md merge=<word> in info/attributes and merge.<word>.driver "cp %B %A". In each case the conflict is shown, the refs are unchanged and main's words are kept.
  • Mutants Q2, Q3 and Q4, one per word, are killed.

3. MINOR, an ignored file overwritten: FIXED.

  • Before the served fast-forward, _ignored_in_the_way lists the served checkout's ignored files at the paths the merge writes. It runs git ls-files -z --others --ignored --exclude-standard -- :(literal)<path> over every path that git diff --name-only -z <main> <merge commit> names, plus each ancestor of one that exists as a non-directory.
  • I measured three ways git 2.43 overwrites with no word: an ignored local.env; build/sub/out.bin under an ignored build/; and an ignored FILE keep where the branch adds keep/x.
  • The refusal is ignored-files-in-the-way. It names the files and the remedy, and main is unmoved.
  • test_an_ignored_file_the_landing_would_overwrite_is_refused covers all three cases. It then follows the remedy and the landing succeeds, while an unrelated ignored file stays untouched.
  • The left path writes only the fresh landing worktree, so it needs no check.
  • Mutants Q5 (the refusal skipped) and Q6 (the file-where-a-directory-goes case not seen) are killed.

4. MINOR, the guard is wider than FR-004a's one act: FIXED as you proposed.

  • test_only_the_lander_issues_the_served_fast_forward: no module but landing.py and session_git.py names fast_forward_served, SERVED_FAST_FORWARD_ARGV, SERVED_FAST_FORWARD_SETTINGS or served_fast_forward_commit. No other module passes the string "--ff-only" either, whether as a name, an attribute, an import or a string.
  • Five planted spellings are each caught. The remedy f-string at branch_session.py:4045 is not flagged.
  • Mutant Q9, another module naming it, is killed.

5. MINOR, an older git not refused by name: FIXED.

  • _merge maps a GitError from _attribute_neutral and _refuse_merge_drivers to LandingRefused(code="merge-failed"), naming git 2.42 (ATTR_SOURCE_FLOOR).
  • A merge that git refuses over --attr-source names the floor too, and keeps only the first line of git's words, without the usage text.
  • test_a_git_without_attr_source_is_refused_by_name uses a runner that answers --attr-source with exit 129. It covers a branch that changes a file, which stops at check-attr, and an empty-commit branch, which stops at the merge. In both, main is unmoved and the landing worktree is removed.
  • Mutants Q7 (the raw GitError escapes) and Q8 (the floor not named at the merge) are killed.
  • I kept your point: --attr-source needs 2.42, above the plan's stated floor of 2.31. On an older git, land is refused by name, as data-model.md § Landed says, and nothing else changes.

6. NIT, the static issuer check can be satisfied dynamically: ACCEPTED LIMIT.

  • This follows holder ruling openxFactory#656 6035797819. It is the class of 6028383410 and 6028539440: exploiting it takes a deliberate structural edit of reviewed openDox code, and 12.6a's in-process limit for deliberate code covers it.
  • It is recorded in the PR body's limits section.

Your NOT REACHED items:

  • The url.insteadOf double rewrite: now covered.
    • get-url applies insteadOf once, so a single rewrite to a helper is refused as remote-transport.
    • The probe applies it again. Its environment admits only git's own transports (GIT_ALLOW_PROTOCOL), so a second rewrite runs no helper. Measured on git 2.43: without it, git-remote-evil ran.
    • Tests: test_a_helper_reached_by_a_url_rewrite_is_refused_and_never_runs and test_a_helper_reached_by_a_second_rewrite_never_runs.
  • A repository's own core.sshCommand: the probe's GIT_SSH_COMMAND (batch mode, as in the runtime's out_bounded) outranks it, and test_the_probe_never_waits_on_a_prompt_or_a_stalled_remote asserts it never runs.
  • Not addressed here: merge.renormalize with core.autocrlf, SHA-256 repositories, and T016's surface.

Copilot's sixth review at 093bc9c4 raised 9 threads. All 9 are fixed in ff6f1cb, answered and resolved, leaving 0 unresolved of 33.

@brettheap
brettheap requested a balanced review from Copilot October 8, 2026 19:42
@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T19:49:44.748442Z 4527432 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/opendox/session_git.py Resolved
Comment thread src/opendox/session_git.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4527432718

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/opendox/landing.py Resolved
Comment thread src/opendox/landing.py Resolved
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-3 (openXfactory-3)

REVIEW R2-DELTA of T012 + T013 at 4527432 (this PR's DRAFT-CLEAN head): GO.

  • 1 new finding: 0 BLOCKER, 0 MAJOR, 1 MINOR, 0 NIT.
  • It checks the fix-now round against lane 3's R2 at 093bc9c4 (6035652847), the holder's rulings 6035797819 and 6067853207, and lane 4's answer 6067643141.

The R2 findings

  • 1 FIXED. src/opendox/landing.py:1021 pins -c branch.HEAD.mergeOptions= on the landing merge.
    • The config walk now loops both -X theirs and -s ours, and the fallback-driver test gained detached-head-theirs and detached-head-ours.
    • Removing the pin fails both tests.
    • Probes at 4527432 with -X theirs, -s ours and the lowercase branch.HEAD.mergeoptions are each refused merge-conflict, with main unmoved.
  • 2 FIXED. _STATE_NAMED_DRIVERS_FAIL (landing.py:191) pins the drivers named set, unset and unspecified to false.
    • There is one test case per word (tests/test_landing_guardrails.py:1696). Removing the pins fails the cases.
    • Probes with merge=<word> plus a cp %B %A driver are refused merge-conflict for each word.
  • 3 FIXED. _ignored_in_the_way (landing.py:1051) refuses ignored-files-in-the-way (:1104) before the served fast-forward.
    • The test has three cases, then follows the remedy through to a landing (tests/test_landing_guardrails.py:935).
    • Three breaks are caught: the check switched off, the ancestor specs dropped, and untracked files listed instead of ignored ones.
    • These probes are all refused with the user's file intact:
      • the exact path;
      • an ignore set only in .git/info/exclude;
      • an ignore set only in a global core.excludesFile;
      • an ignored directory;
      • an ignored file inside a tracked directory the branch replaces;
      • an ignored symlink ancestor;
      • a CR in the name;
      • glob characters in the name.
  • 4 FIXED. test_only_the_lander_issues_the_served_fast_forward (tests/test_landing_guardrails.py:821) is not vacuous.
    • Five planted spellings are each caught, and the f-string remedy is not.
    • A planted caller in branch_session.py fails it.
  • 5 FIXED for the ruled case. _merge turns a GitError from the --attr-source reads into merge-failed naming git 2.42 (landing.py:976), with a floor note at merge time.
    • test_a_git_without_attr_source_is_refused_by_name (tests/test_landing_guardrails.py:1909) covers both shapes, and removing either half fails it.
    • The MINOR below is what remains.
  • 6 RECORDED, documentation only. The accepted limit is recorded in ff6f1cb's message and in the body's line 13, which cites 6035797819.
    • It is not in the body's "Stated limits" section, where that ruling puts it.
    • Non-blocking: move it there, or repeat it there.

New finding

  • MINOR, src/opendox/landing.py:836. On a git older than 2.31 with a remote attached, land never reaches the named floor refusal. (Such a git also lacks --attr-source.)
    • Such a git ignores GIT_CONFIG_COUNT, so the transient-remote probe fails first, with remote-unreadable ("… does not appear to be a git repository").
    • That refusal does not name the floor, and it wrongly tells the user to fix or remove the remote.
    • Simulated with a PATH wrapper. Without a remote, the same git gets merge-failed naming 2.42.
    • It fails closed and is not a bypass, but Debian 11 ships git 2.30.
    • Fix: read git version once at the start of land, and refuse below ATTR_SOURCE_FLOOR (:196) with merge-failed naming the floor, before the remote probe. Add a test with a runner that reports an old version.

Checked OK

  • Copilot's sixth review at 093bc9c4. All nine items (4205571514 to 4205571916) map to ff6f1cb. Seven of those guards were broken in a scratch worktree, and a test failed for each. 16 of 16 of lane 3's own mutants are killed.
  • The main merge in 4527432 is a clean auto-merge: its tree is identical to git merge-tree ff6f1cb 99220883. The delta touches only T012's and T013's files, and no message carries a closing keyword.
  • The probe environment matches the runtime push's: batch-mode ssh, no prompt, no askpass. Overriding core.sshCommand fails closed.
  • Governance. The work-tree top is asked of git. A bare repository and a .git directory both read not-a-repository.
  • The holder's accepted limits (6067853207). None is a bypass with a simple payload, so the ruling's premise holds. A checkout path ending in a newline gets main-checked-out-elsewhere, which fails closed.

Not reached

  • The last 14% of lane 3's own full suite. It reached 86% with 0 failures and 0 errors, then stopped at the account-swap drain. Lane 4's measured run (5795 passed, 11 skipped) is the full count.
  • Lane 4's 106 mutants. Lane 3 ran only its own 16.
  • The 2.42 floor itself. There are no git release notes in the container, so it stands as the writer's measurement.
  • Real git versions other than 2.43. Both old-git cases were simulated.
  • core.gitProxy on the probe.

@brettheap
brettheap marked this pull request as ready for review October 8, 2026 21:05
@sourcery-ai

sourcery-ai Bot commented Oct 8, 2026

Copy link
Copy Markdown

Sorry @brettheap, your pull request is larger than the review limit of 150,000 diff characters

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

READY (holder, manual landing) at 4527432

The holder's gate at 4527432 (T012/T013, the landing seam): validate, acceptance and SonarCloud all SUCCESS (3 of 3); 0 unresolved threads; no closing keywords; Codex reviewed the exact head (4527432718); lane 3's R2-DELTA GO (#656 6068087981). Copilot's "Changes recommended" at this head stands only for the ruled limits #656 6067853207 and 6069024568, so the manual path lands it under plan 038's ruled word (#656 6013547504: lane openxfactory-4 lands every PR).

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

READY (holder, manual landing) at 4527432

The holder's gate at 45274327 (T012/T013, the landing seam): validate, acceptance and SonarCloud all SUCCESS (3 of 3); 0 unresolved threads; no closing keywords; Codex reviewed the exact head (4527432718); lane 3's R2-DELTA GO (#656 6068087981). Copilot's "Changes recommended" at this head stands only for the ruled limits #656 6067853207 and 6069024568, so the manual path lands it under plan 038's ruled word (#656 6013547504: lane openxfactory-4 lands every PR).

@brettheap
brettheap merged commit 6827caf into main Oct 8, 2026
5 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

LANDED — lane openxfactory-4, 2026-10-08T21:08:54Z, PR #90 → 6827caf (opensoft/openDox-code main; plain gate)

T012/T013 the landing seam; Copilot standing for ruled limits 6067853207 and 6069024568; lane 3 GO 6068087981; Codex at the head

brettheap added a commit that referenced this pull request Oct 8, 2026
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@brettheap
brettheap deleted the r2/t012-landing-seam branch October 8, 2026 23:22
brettheap added a commit that referenced this pull request Oct 9, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants