You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DRAFT: T016: the land verb, routes and confirm control (plan 038) - #100
T016 [US2] [oDc]: the land verb, routes and confirm control (plan 038)
openxFactory specs/038-opendox-document-tool-self-maintenance/tasks.md, T016, on main. Claim: #656 6070993070. Stacked on T015 until #96 landed (20:20:15Z, c94878be); this branch was re-created from that main, so it carries no T015 commit.
Realizes: 12.6a (part: the bindings and the surface), 12.6.
Falsifier: F12.2's guardrail nodes that drive the surface; T012's suite re-run green; a test that a host profile sees no actions.land key; a capability test that actions.land is true for standalone with a lander and for governed with an instrument, and false otherwise.
Ruled: R2Q1, R2Q3, R2Q4, R2Q5, R2Q6, R2Q7, R2Q9 (item 7); the holder's 6023619783 (item 1), 6027633398 (the collateral Files), 6069024568 (item 2, the chains), 6103915259 (item 10: each confirmation issuer states the operation it confirms; FIX) and 6110997237 (item 11: two accepted limits). Decisions: CF-1, N-2, N-11, OQ-12-13, OQ-12-14, OQ-12-17.
What it does
The bindings (12.6a).serve.py gains landing_factory (a build_server keyword, a handler attribute, and _session_lander(), declared only where session is true), with served_lander() as its default: the neutral lander where the checkout is standalone, and nothing otherwise. cli.py gains _landing_port(repo_root, *, local), which binds the same way. generate-and-open declares the server's landing_factory with the install it resolved (_served_landing_factory), so --local lands without OPENDOX_INSTALL_MODE being set (quickstart § 3).
The verb.opendox land --repo-root PATH --branch BRANCH [--local] [--json] lives in cli_branch_actions.py and is contributed through default_profile.py's SUBCOMMAND_EXTENSIONS (N-2).
It refuses main, a branch that does not exist, and a repository where nothing can land, each by name and before it asks.
Then it asks at the controlling terminal (landing_confirm.confirm_at_terminal), showing the branch, its head and the operation this landing performs: a merge commit onto main where a lander is bound, or a submission to the host's instrument where the repository is governed (item 10, below).
It lands, and prints the merge commit and the git revert -m 1 <merge> that undoes it. --json prints the Landed object.
No bypass flag (N-11): the verb takes exactly the four options, and a test holds them to that.
The act shared by both doors.
landing_refusal: land can act where a lander is bound, or where the repository is governed with a contributed instrument. Otherwise the refusal is the governance reading's own: governed-without-an-instrument, or why the governance is unknown (naming .opendox/governance.yaml and its content).
landing_operation: the operation land performs, merge or submit, decided from the reading landing_refusal makes. Both issuers state it BEFORE they ask (item 10).
land_branch: the Landed object through the lander, every field CHECKED by landed_object against data-model.md § Landed (lane 3's MAJOR, below). Under governed it submits through the instrument (landing.request_landing) and answers its Submission, checked and redacted by T015's submission_object (R2Q4 (a)). It performs exactly the operation its confirmation's question named, and otherwise refuses with operation-changed.
Every refusal passes through redacted_text. A failure nobody named is reported by its type alone.
The routes (OQ-12-13).POST /actions/session/land-nonce answers {"nonce", "branch", "head", "operation"} from this server's LandingNonces. operation is merge or submit, recorded with the nonce, and the land route performs exactly that operation (item 10). POST /actions/session/land takes {"branch", "nonce"} and answers Landed, the instrument's Submission, or a named refusal:
409 landing_refused with a code, which is always one the route lists (LANDING_CODES, the codes the seam, the governance reading, the confirmation and the verb name), or else unlisted (lane 3's MAJOR);
409 merge_conflict with paths and remedy;
the instrument's submission_refused or no_submission_target;
500 landing_failed, with the type alone in the log.
Both routes sit behind 12.4a's three clauses. The gate is factored into one helper that the submit route shares, with submit's answers unchanged. Both take no repository from the request, and both are contributed through the default profile's ROUTE_EXTENSIONS and HANDLER_CONTRIBUTIONS. The nonce store is one per server, kept on that server's bound handler class.
actions.land (OQ-12-14 refined by ADV-14).
Presence: only where bindings answer BOTH land routes (lands_here), so a host's map is unchanged, key for key (R2Q3 (a)).
Value: the local human's verdict AND landing_can_act. It is false under unknown, under governed with no instrument, and on the hosted plane.
The repository can change while the server runs, so the /capabilities arm reads that half again on each request, on a copy of the map. Core _DEFAULT_CAPABILITIES gains nothing.
The confirm control.mountLandConfirm in web/views/branch-actions.js is a separate mount beside T015's submit control, mounted by app.js into a new #landconfirm in index.html.
It is keyed on actions.land and never on session.
It fetches a nonce, shows the branch, the full head it is bound to and the operation the server states, and posts it once (the nonce is let go before the post). It does not offer a nonce whose operation it cannot name.
It never offers main, and it refuses a nonce bound to another branch.
R2Q5 (a).merge_state already recognises the lander's --no-ff merge commit, so branch_session.py changes in its FR-033 comment only. A node proves that a live session whose branch lands is reconciled: its branch is deleted and its worktree removed.
Falsifier, quoted (local, at the head 0bec6f5b)
F12.2's thirteen nodes by name (each binding node now also asserts T016's two bindings bind no lander, and test_land_requires_an_explicit_human_act also drives the verb):
(the thirteen pass inside the whole-file run below; at 99c4e079 alone: 13 passed in 13.43s)
T012's suite re-run, whole, with T016's surface nodes:
python -m pytest -q tests/test_landing_guardrails.py
207 passed in 172.97s (0:02:52)
The named T016 nodes include:
test_a_host_profile_sees_no_land_key (the host profile's map equals core _DEFAULT_CAPABILITIES' keys; both routes 404 unknown_action);
test_the_land_key_is_true_where_land_can_act_and_false_otherwise: TRUE for standalone with a lander, and for a test host with an instrument. FALSE for a host without an instrument, a host that fails to load, the hosted install, no actor, a 0.0.0.0 bind, no declaration, a governed declaration, and a factory that binds nothing;
test_land_with_a_piped_stdin_and_no_terminal_is_refused (the installed verb in a child with no controlling terminal);
Red first. Against the product before T016 (c94878be with these tests): 58 failed and 3 passed. The three that pass are guards that hold before the surface exists: a host profile has no land key and no land verb, and the existing merge observation recognises the lander's commit. The JS control's four nodes and the menu probe were written after the control, and are red against c94878be's branch-actions.js and account-menu.js: 4 errors (m.landCapable is not a function) and 1 failed.
Mutants: 61, all KILLED at 0bec6f5b. Each is run against the nodes that must kill it, in a separate worktree that is clean afterwards. M1 is the /dev/tty bypass through the view's issuer, and M2 is a --yes bypass flag. M1, M6, M13, M15 and M34 were re-targeted to round 4's code. The first 34:
M59 first died at fixture setup: the one-key edit left merge with no question, so the harness threw. It was re-written as a true two-key swap and re-run alone, and it now dies on the test's assertion (1 failed).
The full suite, as validate runs it (CI=1, OPENDOX_TEST_SANDBOX_REQUIRED=1, LANG=C.UTF-8, every GIT_* and XF_* unset, postgres:16 reached as the service, the venv from CI's install command):
at 99f0eb22: 5963 passed, 11 skipped, 2 warnings in 2124.34s (0:35:24) EXIT 0
at 1bba2b1c: 5970 passed, 11 skipped, 2 warnings in 1689.58s (0:28:09) EXIT 0
at 99c4e079: 5972 passed, 11 skipped, 1 failed (the failure: test_the_draft_page_budget_does_not_read_the_bodies_it_sizes, the load-sensitive timing test; CI's validate at 99c4e079: SUCCESS)
at 0bec6f5b: 5994 passed, 11 skipped, 1 failed, 2 warnings in 3717.09s (1:01:57) (the failure: the same timing test,
which passes alone: 1 passed in 1.78s, EXIT 0)
Review round 1 (Copilot at b933d980, "Changes recommended", two findings, both FIXED in 1bba2b1c)
r4234726885 (medium), FIXED. The conflict answer redacted message alone, but paths and remedy carry the same repository text (a path, a branch name). Each is now redacted by the same rule. New node: test_a_conflict_answer_redacts_every_field_it_carries, with a branch sess&access_token=<secret> conflicting on notes?token=<secret>.md. It was red before the fix; M28 and M29 are killed by it.
r4234726939 (low), FIXED. A land-nonce body that is not an object was told the land route's shape, which names nonce. It is now told its own shape, LAND_NONCE_NOT_AN_OBJECT. New node: test_each_land_route_names_its_own_body_shape. Its two nonce cases were red before the fix; M30 is killed by it.
Both threads are answered and resolved.
Review round 2 (Copilot at 1bba2b1c, "Needs a closer look", 0 open findings, two "previously missed" points, both FIXED in 99c4e079)
A binding whose answer has no land operation (cli_branch_actions.py 374 and 419). An injected landing_factory returning such an object advertised actions.land: true and issued a nonce, and then the land route answered 500. Now _usable treats such an answer as no lander: the key reads false, and the nonce route and the verb refuse by name (no-lander-bound). New node: test_a_binding_that_answers_no_lander_is_no_lander, red before the fix; M31 is killed by it.
A bidi override in a branch name (branch-actions.js 198). The browser's question showed the name verbatim, while the terminal's prompt escapes it (session_git.shown). shownName now shows it the same way in the question and in both answers, and the verb's landed report does too. New nodes: test_the_confirm_control_shows_a_branch_name_escaped and test_the_landed_report_shows_a_branch_name_escaped, both red before the fix; M32, M33 and M34 are killed by them.
Codex answered the triggers at b933d980 and 1bba2b1c with its usage-limit message, so it has not reviewed this PR.
Review round 3 (Copilot at 99c4e079, "Needs a closer look", 0 open findings, no thread): FIXED under holder ruling item 10 (6103915259)
Copilot raised two previously missed points with one cause. On the governed path, which submits through the host's instrument and merges nothing, both confirmation surfaces asked about a merge commit onto main. I first proposed it as an accepted limit; the holder ruled it a FIX in this round. The confirmation is the human act the landing seam is built around, so it must name the operation that will actually happen.
The terminal issuer.landing_confirm.confirm_at_terminal(branch, head, *, operation) takes operation as a REQUIRED keyword (OPERATION_MERGE or OPERATION_SUBMIT), so no caller can leave the wording to a default. An unknown value is refused before the terminal is opened. Its questions:
Land branch <b> at <head> onto main with a merge commit?
Submit branch <b> at <head> to the host's instrument? Nothing merges here: the merge stays the governance's act.
landing_confirm.py is admitted into T016's Files for this wording and parameter only. The capability's branch-and-head binding, its single use and the static two-issuer check are unchanged.
The decision.cli_branch_actions.landing_operation reads the binding once and decides from the reading landing_refusal uses. The verb decides before it prompts. The land-nonce route decides before it issues, records the operation with the nonce (under one lock), and the land route passes it on. land_branch performs exactly that operation, or refuses with operation-changed when the binding changed after the question, asking neither the lander nor the instrument.
The browser issuer.issuedNonce accepts only operationmerge or submit, and confirmQuestion asks:
land <b> at <head> onto main with a merge commit?
submit <b> at <head> to the host's instrument? nothing merges here: the merge stays its governance's act
Tests, red first (99c4e079 with the new tests: 21 failed, 7 passed). One row per path per issuer:
test_the_terminal_prompt_states_the_operation_land_performs[standalone|governed], which asserts the exact prompt;
test_the_confirm_control_states_the_operation_the_server_will_perform, in the JS lane.
Mutants M47 to M61 swap or drop the operation kind at each step; all are KILLED.
Contract shape, for T002e: the land-nonce answer gains operation, and the land route gains the refusal code operation-changed. T002e records the wording in plan 038's text.
Review round 4 (lane 3's EARLY review at 99c4e079, NO-GO, 1 MAJOR, FIX-NOW): FIXED in 743bb8b3 and 0bec6f5b
The MAJOR: a secret leaking at the print boundary from an injected lander.landed_object printed the five Landed fields unchecked: in the route's 200, the verb's --json, and served_checkout in plain output. Separately, a lander's LandingRefused code went out unredacted in the 409.
landed_object(landed, branch) checks each field against data-model.md § Landed, as submission_object checks a report. It refuses anything that is not the landing's, with a fixed sentence that names only the field (code answer-not-the-landing). The rules:
branch must be the branch landed;
merge_commit and previous_main must be full object names;
served_checkout must be fast-forwarded or left;
pushed must be exactly False;
a field the answer lacks is not the landing's either.
serve_branch_actions.answered_code answers a code only from LANDING_CODES, and unlisted for any other, including a code that is not a string. This covers the landing_refused, merge_conflict and confirmation: arms. test_the_codes_the_route_answers_are_the_codes_the_seam_names holds the list equal, in both directions, to the codes landing.py, landing_confirm.py and cli_branch_actions.py spell.
One trust model, the fixed credential corpus.HostileLander is driven through every print path: the route's 200, its 409 and the server log, and the verb's text, its --json and its refusal. The corpus covers:
user:pw@;
a token as the bare username;
an x-access-token: URL;
?ticket=;
a fragment;
scp-like user:pw@host:path;
a URL in prose.
The nodes: test_a_landed_answer_is_checked_field_by_field_at_every_door[<each field>], test_a_landers_refusal_reaches_no_door_with_its_credential[<each shape>], test_a_listed_code_is_answered_as_it_is and test_a_well_formed_landed_answer_is_answered_as_it_is. They were red at 99c4e079, with the secret in the route's body and code; M35 to M46 are killed by them.
Holder ruling item 11 (6110997237): two ACCEPTED LIMITS, in T015's code
(a) The shared redactor leaves a bare token in prose that is not part of a URL, such as x-access-token:VALUE written alone. This is the limit 6086098003 item 2 (b) already accepts: "A raw token in a host port's prose, with no URL, passes."
(b) T015's submission_object accepts str subclasses. Only in-process code can build one, since JSON and git output give exact str. The lander's trust model is hostile DATA from trusted CODE (5988818366). T016 does not edit T015's code for it, and landed_object and answered_code use the same isinstance test.
Codex answered the triggers at b933d980, 1bba2b1c and 99c4e079 with its usage-limit message (CODEX-LIMIT). The trigger at 0bec6f5b is comment 6111587379 (2026-10-11 17:15Z).
Files changed
T016's Files line: src/opendox/serve.py, src/opendox/cli.py, src/opendox/landing_confirm.py (admitted by item 10 for the prompt's wording and the operation parameter only), src/opendox/default_profile.py (prose only: its BranchActionSubcommands and BranchActionRouteExtension carry land from the two branch-action modules, and its docstring and tuple comments now name land), src/opendox/cli_branch_actions.py, src/opendox/serve_branch_actions.py, src/opendox/branch_session.py (its FR-033 comment only), src/opendox/web/views/branch-actions.js, src/opendox/web/app.js, src/opendox/web/index.html, tests/fixtures/web_boundary_census.yaml (three rows and the A and C totals; views/branch-actions.js 327 -> 353 and A 19104 -> 19130 for item 10), tests/test_web_boundary.py (two pins: the land routes are addressed by branch-actions.js alone, and the control keys on land, never on session), and tests/test_landing_guardrails.py (the surface nodes).
Admitted collateral, minimal (for the holder's confirmation at READY):
tests/test_default_profile.py (6023619783 item 1): test_the_default_contributes_the_runtime_command_opendox_runtime_builds expects ["runtime", "submit", "land"], with its message updated. Nothing else in the file changes.
tests/test_capability_honesty.py (6027633398): GOVERNED gains "land": ("POST", "/actions/session/land"). _assert_every_true_flag_answers expects a composed host's map to lack submit and land.
tests/test_lens_seed_actions.py (6027633398): in test_the_lens_of_a_real_standalone_serve_offers_neither_seed_action, the contributed-route manifest is now submit, then /actions/session/land-nonce, then /actions/session/land. There is still no seed route.
src/opendox/web/views/account-menu.js (6069024568 item 2, the chain T015 → T016): WRITE_ACTIONS gains "land". The census line count is unchanged.
tests/test_submit_route.py::test_the_default_profile_contributes_the_route_and_its_mixin. Its assertion bindings == (_SUBMIT,) enumerated the default profile's contributed routes. It now asserts submit first, then the two land routes. No other assertion in the file changes.
pyproject.toml's :312 is not touched: the control lives in the existing views/branch-actions.js, so the bundle stays at 43 files.
Not done here
T017 re-pins the CI floors at phase 4's tip. T018 documents land in the openDox root README. T019 proves openxFactory's host unchanged.
No production host declares an instrument in release 2 (R2Q2 (a) with R2Q3 (a)). The governed path runs against registered TEST hosts. The verb's governed path needs a test host that also carries openDox's verb, because a host profile replaces the default's command tree.
An instrument's refusal is redacted by T015's rule, which over-redacts the words after a token= value. That errs on the safe side, and it is T015's rule, not changed here.
The surface section of tests/test_landing_guardrails.py: the verb, the two
routes, the actions.land key, the server's and CLI's bindings, and R2Q5 (a)'s
merge observation; and F12.2's binding nodes now assert T016's bindings bind
no lander. Against the product before T016: 58 failed, 3 passed (the three
guards that hold before the surface exists).
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…land (plan 038)
cli_branch_actions.py: the land act both doors share (landing_refusal,
land_branch, branch_head) and `opendox land`, confirmed at /dev/tty with no
bypass flag. cli.py: _landing_port, and generate-and-open declaring the
server's landing_factory with the install it resolved. serve.py:
landing_factory, served_lander, landing_can_act, actions.land present only
where both land routes are bound, read again per /capabilities request.
serve_branch_actions.py: land-nonce and land behind the three clauses.
tests/test_landing_guardrails.py: 169 passed. Not yet: the confirm control,
census, collateral tests, account menu, branch_session comment, mutants.
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…t menu (plan 038)
views/branch-actions.js gains mountLandConfirm beside the submit control:
keyed on actions.land and the console token, it fetches a nonce, shows the
branch and head it is bound to, and posts it once. app.js mounts it into the
new #landconfirm in index.html. The census rows and totals follow the three
files. account-menu.js names land among WRITE_ACTIONS (the chain T015 ->
T016, #656 6069024568 item 2). Node harness tests for the control and the
menu, and web-boundary pins for the land routes and key.
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…unt for land (plan 038)
branch_session.py: the FR-033 comment says a standalone landing is observed
by the same merge observation, unchanged (comment only). The admitted and
same-kind enumeration collateral, each minimal: test_default_profile.py (the
contributed verbs gain land, 6023619783), test_capability_honesty.py
(GOVERNED gains land; a host's map lacks submit and land, 6027633398),
test_lens_seed_actions.py (the contributed-route manifest gains the two land
routes, 6027633398), and test_submit_route.py's
test_the_default_profile_contributes_the_route_and_its_mixin (the bindings
are submit, then the two land routes; same-kind, listed in the PR body).
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Its docstring and its three tuples' comments named the submit route alone;
they now name the land verb and its two routes too. Prose only.
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.
Implements the full T016 landing surface: a human-confirmed CLI verb, nonce-protected HTTP routes, binding- and governance-aware capabilities, and a browser confirmation control, with standalone merges and governed instrument submissions sharing one redacted landing act and extensive guardrail coverage.
Sequence diagram for human-confirmed branch landing
sequenceDiagram
actor Human
participant CLI as opendox land
participant Landing as landing_refusal
participant Confirm as landing_confirm.confirm_at_terminal
participant Lander as LandingPort
participant Git as Git checkout
Human->>CLI: cmd_land(repo_root, branch)
CLI->>Landing: landing_refusal(lander, checkout_root)
alt landing is unavailable
Landing-->>CLI: LandingRefused
CLI-->>Human: redacted refusal
else landing can act
CLI->>CLI: branch_head(checkout_root, branch)
CLI->>Confirm: confirm_at_terminal(branch, head)
Human-->>Confirm: branch confirmation
Confirm-->>CLI: confirmation
CLI->>Lander: land_branch(lander, checkout_root, branch, confirmation)
Lander->>Git: --no-ff merge branch into main
Git-->>Lander: Landed(merge_commit)
Lander-->>CLI: landed_object
CLI-->>Human: merge commit and git revert -m 1 command
end
Loading
Sequence diagram for nonce-protected HTTP landing
sequenceDiagram
actor Browser
participant Routes as BranchActionRoutes
participant Gate as _branch_action_refused_at_the_gate
participant Nonces as LandingNonces
participant Act as land_branch
participant Lander as LandingPort
Browser->>Routes: POST /actions/session/land-nonce {branch}
Routes->>Gate: validate loopback, session, actor, console
Routes->>Routes: branch_head(checkout_root, branch)
Routes->>Nonces: issue_nonce(branch, head)
Nonces-->>Browser: nonce, branch, head
Browser->>Routes: POST /actions/session/land {branch, nonce}
Routes->>Gate: validate loopback, session, actor, console
Routes->>Nonces: confirm_nonce(branch, nonce)
Nonces-->>Routes: confirmation
Routes->>Act: land_branch(lander, checkout_root, branch, confirmation)
Act->>Lander: land(branch, confirmation)
Lander-->>Routes: Landed
Routes-->>Browser: 200 landing result
Adds the land command and shared landing semantics for standalone merges and governed submissions.
Registers land with the four supported options and enforces pre-confirmation refusals for invalid branches, unsupported governance, and install-mode conflicts.
Requires an explicit controlling-terminal confirmation, redacts named failures, and reports landed merge metadata plus its revert command.
Shares the landing act between CLI and HTTP paths, selecting a neutral lander for standalone repositories or a host instrument for governed repositories.
Introduces nonce-protected HTTP routes for confirming and performing a landing.
Adds land-nonce and land routes with strict request schemas, per-server nonce storage, branch/head binding, single-use redemption, and the existing session security gate.
Maps merge conflicts, governance refusals, submission failures, and unnamed failures to constrained, redacted responses.
Contributes the routes only through the default profile and reuses the shared landing implementation.
Adds the browser confirmation control for the two-step landing flow.
Mounts a separate control beside branch actions and keys it exclusively on actions.land plus a console token.
Fetches and displays a branch-bound full commit nonce, rejects main and foreign/invalid nonce responses, and consumes the pending nonce before posting once.
Displays standalone landing, governed submission, conflict, and refusal outcomes.
Documents that live sessions continue to terminate through existing merge observation.
Updates the FR-033 commentary to explain that a --no-ff standalone landing is observed by the existing merge-state reconciliation path without teaching sessions to command landing.
src/opendox/branch_session.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!
… names its own body shape (Copilot on #100)
Copilot r4234726885 (medium): the conflict answer redacted `message` alone,
while `paths` and `remedy` carry the same repository text; each is redacted
by the same rule now. Copilot r4234726939 (low): a land-nonce body that is
not an object was told the land route's shape, naming `nonce`; it is told
its own (LAND_NONCE_NOT_AN_OBJECT).
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.
Validate injected lander exposes a callable land operation
src/opendox/cli_branch_actions.py:374
This treats every non-None factory result as a usable lander. For example, the documented injection seam can return object(): /capabilities then advertises actions.land: true, the nonce route succeeds, and the land route is guaranteed to fail with AttributeError and a 500. Validate that the result exposes a callable land operation and return the named no-lander refusal otherwise.
This issue also appears on line 419 of the same file.
Escape bidi-format characters in browser branch confirmations
src/opendox/web/views/branch-actions.js:198
Git accepts Unicode bidi-format characters in branch names (the existing test_the_prompt_shows_a_branch_name_escaped covers this), but this confirmation sentence renders the branch verbatim. A name such as sess\u202e1 can therefore be visually reordered in the browser, undermining the human confirmation this control is meant to obtain. Escape non-printable/format characters before display, mirroring the TTY prompt's session_git.shown behavior, and cover the browser control with the same bidi branch case.
… shown escaped (Copilot at 1bba2b1 on #100)
Copilot's review at 1bba2b1 ("Needs a closer look", 0 open findings) named
two previously missed points, both fixed:
- cli_branch_actions.py: a binding's answer with no callable `land` is no
lander (`_usable`), so actions.land reads false, the nonce route and the
verb refuse by name (no-lander-bound), and nothing answers 500;
- branch-actions.js: `shownName` shows a branch name as the terminal's prompt
does (session_git.shown), escaped where it holds a bidi override or another
character a display acts on, in the question and both answers; the verb's
landed report does the same.
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Governed landings submit rather than merge, but both confirmation surfaces currently tell users they are confirming a merge commit.
0 open findings
Previously missed (2)
In code that hasn't changed since last review
Terminal confirmation describes merge instead of instrument submission
src/opendox/cli_branch_actions.py:474
For a governed repository with an instrument, landing_refusal() permits execution and land_branch() submits through that instrument, yet this issuer asks the user to confirm a merge commit onto main. The terminal confirmation must use governance-neutral wording or be told whether this invocation will merge or submit, otherwise the explicit human act confirms the wrong operation.
This confirmation is inaccurate on the governed path: actions.land is also true when a host instrument exists, but confirming there calls request_landing() and only submits the branch; it does not merge onto main. Use governance-neutral wording (or expose the action kind) so the human confirms the operation that will actually occur.
…the operation it confirms (plan 038)
Lane 3's MAJOR on #100 at 99c4e07 (FIX-NOW): landed_object checks the
five Landed fields against data-model.md § Landed (branch, two full
object names, served_checkout in {fast-forwarded, left}, pushed is
False), refusing with a fixed sentence (answer-not-the-landing); the
land routes answer a refusal code only from LANDING_CODES, else
`unlisted`. A hostile lander carrying the fixed credential corpus is
driven through the route's 200 and 409 and its log, and the verb's
text, --json and refusal.
Holder ruling item 10 (openxFactory#656 6103915259): confirm_at_terminal
takes a required keyword `operation` (merge | submit) and words the
question for it; landing_operation decides it before the prompt from the
reading landing_refusal uses; the nonce answer states it, the view's
question names it, and land_branch refuses `operation-changed` when the
act would differ.
WIP: mutants, the full suite and the PR body are not yet run for this
round.
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…odel; rows for an absent field and a non-string code (plan 038)
Holder ruling item 11 (b): the lander trust model is hostile data from
trusted code, as submission_object's is, so landed_object and
answered_code test isinstance(..., str). New rows: a Landed answer that
lacks a field is refused naming it, and a refusal whose code is not a
string is answered `unlisted`.
Lane: openxfactory-4
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
Codex expert-panel review of 0bec6f5be8dbf1529c1582d1ac7f366342495960 against this PR's main base.
No additional actionable finding beyond the existing unresolved confirmation-button race. Confirmed that ask() disables the ask button, while confirm() leaves it enabled during the landing POST. Issuing another nonce while confirmation is in flight can invalidate or replace the nonce/question associated with the pending operation. Keep the ask control disabled until confirmation settles, with a deferred-response regression case.
The earlier conflict-field redaction and nonce-body-shape comments are fixed in the current code. Reviewed CLI/HTTP operation agreement, branch/head-bound single-use confirmation, refusal gates, capability composition, and response validation; no other evidence-backed defect found.
Validation: static source/diff/test and review-thread inspection. Existing validate, acceptance, and SonarCloud checks report SUCCESS; no project test suite was rerun. Readiness: resolve the open race and follow the documented draft/landing controls before merge.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lane: openxfactory-4 (openXfactory-4-openDox_extraction)
T016 [US2] [oDc]: the
landverb, routes and confirm control (plan 038)openxFactory
specs/038-opendox-document-tool-self-maintenance/tasks.md, T016, on main. Claim: #6566070993070. Stacked on T015 until #96 landed (20:20:15Z,c94878be); this branch was re-created from thatmain, so it carries no T015 commit.actions.landkey; a capability test thatactions.landis true forstandalonewith a lander and forgovernedwith an instrument, and false otherwise.6023619783(item 1),6027633398(the collateral Files),6069024568(item 2, the chains),6103915259(item 10: each confirmation issuer states the operation it confirms; FIX) and6110997237(item 11: two accepted limits). Decisions: CF-1, N-2, N-11, OQ-12-13, OQ-12-14, OQ-12-17.What it does
The bindings (12.6a).
serve.pygainslanding_factory(abuild_serverkeyword, a handler attribute, and_session_lander(), declared only wheresessionis true), withserved_lander()as its default: the neutral lander where the checkout isstandalone, and nothing otherwise.cli.pygains_landing_port(repo_root, *, local), which binds the same way.generate-and-opendeclares the server'slanding_factorywith the install it resolved (_served_landing_factory), so--locallands withoutOPENDOX_INSTALL_MODEbeing set (quickstart § 3).The verb.
opendox land --repo-root PATH --branch BRANCH [--local] [--json]lives incli_branch_actions.pyand is contributed throughdefault_profile.py'sSUBCOMMAND_EXTENSIONS(N-2).main, a branch that does not exist, and a repository where nothing can land, each by name and before it asks.landing_confirm.confirm_at_terminal), showing the branch, its head and the operation this landing performs: a merge commit ontomainwhere a lander is bound, or a submission to the host's instrument where the repository isgoverned(item 10, below).git revert -m 1 <merge>that undoes it.--jsonprints theLandedobject.The act shared by both doors.
landing_refusal:landcan act where a lander is bound, or where the repository isgovernedwith a contributed instrument. Otherwise the refusal is the governance reading's own: governed-without-an-instrument, or why the governance isunknown(naming.opendox/governance.yamland its content).landing_operation: the operationlandperforms,mergeorsubmit, decided from the readinglanding_refusalmakes. Both issuers state it BEFORE they ask (item 10).land_branch: theLandedobject through the lander, every field CHECKED bylanded_objectagainst data-model.md § Landed (lane 3's MAJOR, below). Undergovernedit submits through the instrument (landing.request_landing) and answers itsSubmission, checked and redacted by T015'ssubmission_object(R2Q4 (a)). It performs exactly the operation its confirmation's question named, and otherwise refuses withoperation-changed.redacted_text. A failure nobody named is reported by its type alone.The routes (OQ-12-13).
POST /actions/session/land-nonceanswers{"nonce", "branch", "head", "operation"}from this server'sLandingNonces.operationismergeorsubmit, recorded with the nonce, and the land route performs exactly that operation (item 10).POST /actions/session/landtakes{"branch", "nonce"}and answersLanded, the instrument'sSubmission, or a named refusal:409 landing_refusedwith acode, which is always one the route lists (LANDING_CODES, the codes the seam, the governance reading, the confirmation and the verb name), or elseunlisted(lane 3's MAJOR);409 merge_conflictwithpathsandremedy;submission_refusedorno_submission_target;500 landing_failed, with the type alone in the log.Both routes sit behind 12.4a's three clauses. The gate is factored into one helper that the submit route shares, with submit's answers unchanged. Both take no repository from the request, and both are contributed through the default profile's
ROUTE_EXTENSIONSandHANDLER_CONTRIBUTIONS. The nonce store is one per server, kept on that server's bound handler class.actions.land(OQ-12-14 refined by ADV-14).lands_here), so a host's map is unchanged, key for key (R2Q3 (a)).landing_can_act. It is false underunknown, undergovernedwith no instrument, and on the hosted plane./capabilitiesarm reads that half again on each request, on a copy of the map. Core_DEFAULT_CAPABILITIESgains nothing.The confirm control.
mountLandConfirminweb/views/branch-actions.jsis a separate mount beside T015's submit control, mounted byapp.jsinto a new#landconfirminindex.html.actions.landand never onsession.main, and it refuses a nonce bound to another branch.R2Q5 (a).
merge_statealready recognises the lander's--no-ffmerge commit, sobranch_session.pychanges in its FR-033 comment only. A node proves that a live session whose branch lands is reconciled: its branch is deleted and its worktree removed.Falsifier, quoted (local, at the head
0bec6f5b)F12.2's thirteen nodes by name (each binding node now also asserts T016's two bindings bind no lander, and
test_land_requires_an_explicit_human_actalso drives the verb):(the thirteen pass inside the whole-file run below; at
99c4e079alone:13 passed in 13.43s)T012's suite re-run, whole, with T016's surface nodes:
The named T016 nodes include:
test_a_host_profile_sees_no_land_key(the host profile's map equals core_DEFAULT_CAPABILITIES' keys; both routes404 unknown_action);test_the_land_key_is_true_where_land_can_act_and_false_otherwise: TRUE for standalone with a lander, and for a test host with an instrument. FALSE for a host without an instrument, a host that fails to load, the hosted install, no actor, a0.0.0.0bind, no declaration, agoverneddeclaration, and a factory that binds nothing;test_land_with_a_piped_stdin_and_no_terminal_is_refused(the installed verb in a child with no controlling terminal);test_the_land_verb_has_no_bypass_flag;test_the_routes_land_a_branch_once_with_the_views_nonce;test_a_live_session_whose_branch_lands_ends_by_the_merge_observation.Red first. Against the product before T016 (
c94878bewith these tests): 58 failed and 3 passed. The three that pass are guards that hold before the surface exists: a host profile has no land key and no land verb, and the existing merge observation recognises the lander's commit. The JS control's four nodes and the menu probe were written after the control, and are red againstc94878be'sbranch-actions.jsandaccount-menu.js: 4 errors (m.landCapable is not a function) and 1 failed.Mutants: 61, all KILLED at
0bec6f5b. Each is run against the nodes that must kill it, in a separate worktree that is clean afterwards. M1 is the/dev/ttybypass through the view's issuer, and M2 is a--yesbypass flag. M1, M6, M13, M15 and M34 were re-targeted to round 4's code. The first 34:Round 4's 27 (lane 3's MAJOR; item 10):
M59 first died at fixture setup: the one-key edit left
mergewith no question, so the harness threw. It was re-written as a true two-key swap and re-run alone, and it now dies on the test's assertion (1 failed).The full suite, as
validateruns it (CI=1,OPENDOX_TEST_SANDBOX_REQUIRED=1,LANG=C.UTF-8, everyGIT_*andXF_*unset,postgres:16reached as the service, the venv from CI's install command):Review round 1 (Copilot at
b933d980, "Changes recommended", two findings, both FIXED in1bba2b1c)messagealone, butpathsandremedycarry the same repository text (a path, a branch name). Each is now redacted by the same rule. New node:test_a_conflict_answer_redacts_every_field_it_carries, with a branchsess&access_token=<secret>conflicting onnotes?token=<secret>.md. It was red before the fix; M28 and M29 are killed by it.nonce. It is now told its own shape,LAND_NONCE_NOT_AN_OBJECT. New node:test_each_land_route_names_its_own_body_shape. Its two nonce cases were red before the fix; M30 is killed by it.Both threads are answered and resolved.
Review round 2 (Copilot at
1bba2b1c, "Needs a closer look", 0 open findings, two "previously missed" points, both FIXED in99c4e079)landoperation (cli_branch_actions.py374 and 419). An injectedlanding_factoryreturning such an object advertisedactions.land: trueand issued a nonce, and then the land route answered 500. Now_usabletreats such an answer as no lander: the key reads false, and the nonce route and the verb refuse by name (no-lander-bound). New node:test_a_binding_that_answers_no_lander_is_no_lander, red before the fix; M31 is killed by it.branch-actions.js198). The browser's question showed the name verbatim, while the terminal's prompt escapes it (session_git.shown).shownNamenow shows it the same way in the question and in both answers, and the verb's landed report does too. New nodes:test_the_confirm_control_shows_a_branch_name_escapedandtest_the_landed_report_shows_a_branch_name_escaped, both red before the fix; M32, M33 and M34 are killed by them.Codex answered the triggers at
b933d980and1bba2b1cwith its usage-limit message, so it has not reviewed this PR.Review round 3 (Copilot at
99c4e079, "Needs a closer look", 0 open findings, no thread): FIXED under holder ruling item 10 (6103915259)Copilot raised two previously missed points with one cause. On the
governedpath, which submits through the host's instrument and merges nothing, both confirmation surfaces asked about a merge commit ontomain. I first proposed it as an accepted limit; the holder ruled it a FIX in this round. The confirmation is the human act the landing seam is built around, so it must name the operation that will actually happen.The terminal issuer.
landing_confirm.confirm_at_terminal(branch, head, *, operation)takesoperationas a REQUIRED keyword (OPERATION_MERGEorOPERATION_SUBMIT), so no caller can leave the wording to a default. An unknown value is refused before the terminal is opened. Its questions:Land branch <b> at <head> onto main with a merge commit?Submit branch <b> at <head> to the host's instrument? Nothing merges here: the merge stays the governance's act.landing_confirm.pyis admitted into T016's Files for this wording and parameter only. The capability's branch-and-head binding, its single use and the static two-issuer check are unchanged.The decision.
cli_branch_actions.landing_operationreads the binding once and decides from the readinglanding_refusaluses. The verb decides before it prompts. The land-nonce route decides before it issues, records the operation with the nonce (under one lock), and the land route passes it on.land_branchperforms exactly that operation, or refuses withoperation-changedwhen the binding changed after the question, asking neither the lander nor the instrument.The browser issuer.
issuedNonceaccepts onlyoperationmergeorsubmit, andconfirmQuestionasks:land <b> at <head> onto main with a merge commit?submit <b> at <head> to the host's instrument? nothing merges here: the merge stays its governance's actTests, red first (
99c4e079with the new tests: 21 failed, 7 passed). One row per path per issuer:test_the_terminal_prompt_states_the_operation_land_performs[standalone|governed], which asserts the exact prompt;test_the_terminal_issuer_states_the_operation_it_is_given_and_no_other;test_the_nonce_states_the_operation_the_land_route_performs[standalone|governed];test_a_landing_whose_operation_changed_after_the_question_lands_nothing;test_the_confirm_control_states_the_operation_the_server_will_perform, in the JS lane.Mutants M47 to M61 swap or drop the operation kind at each step; all are KILLED.
Contract shape, for T002e: the land-nonce answer gains
operation, and the land route gains the refusal codeoperation-changed. T002e records the wording in plan 038's text.Review round 4 (lane 3's EARLY review at
99c4e079, NO-GO, 1 MAJOR, FIX-NOW): FIXED in743bb8b3and0bec6f5bThe MAJOR: a secret leaking at the print boundary from an injected lander.
landed_objectprinted the fiveLandedfields unchecked: in the route's 200, the verb's--json, andserved_checkoutin plain output. Separately, a lander'sLandingRefusedcode went out unredacted in the 409.landed_object(landed, branch)checks each field against data-model.md § Landed, assubmission_objectchecks a report. It refuses anything that is not the landing's, with a fixed sentence that names only the field (codeanswer-not-the-landing). The rules:branchmust be the branch landed;merge_commitandprevious_mainmust be full object names;served_checkoutmust befast-forwardedorleft;pushedmust be exactly False;serve_branch_actions.answered_codeanswers a code only fromLANDING_CODES, andunlistedfor any other, including a code that is not a string. This covers thelanding_refused,merge_conflictandconfirmation:arms.test_the_codes_the_route_answers_are_the_codes_the_seam_namesholds the list equal, in both directions, to the codeslanding.py,landing_confirm.pyandcli_branch_actions.pyspell.One trust model, the fixed credential corpus.
HostileLanderis driven through every print path: the route's 200, its 409 and the server log, and the verb's text, its--jsonand its refusal. The corpus covers:user:pw@;x-access-token:URL;?ticket=;user:pw@host:path;The nodes:
test_a_landed_answer_is_checked_field_by_field_at_every_door[<each field>],test_a_landers_refusal_reaches_no_door_with_its_credential[<each shape>],test_a_listed_code_is_answered_as_it_isandtest_a_well_formed_landed_answer_is_answered_as_it_is. They were red at99c4e079, with the secret in the route's body and code; M35 to M46 are killed by them.Holder ruling item 11 (
6110997237): two ACCEPTED LIMITS, in T015's codex-access-token:VALUEwritten alone. This is the limit6086098003item 2 (b) already accepts: "A raw token in a host port's prose, with no URL, passes."submission_objectacceptsstrsubclasses. Only in-process code can build one, since JSON and git output give exactstr. The lander's trust model is hostile DATA from trusted CODE (5988818366). T016 does not edit T015's code for it, andlanded_objectandanswered_codeuse the sameisinstancetest.Codex answered the triggers at
b933d980,1bba2b1cand99c4e079with its usage-limit message (CODEX-LIMIT). The trigger at0bec6f5bis comment6111587379(2026-10-11 17:15Z).Files changed
T016's Files line:
src/opendox/serve.py,src/opendox/cli.py,src/opendox/landing_confirm.py(admitted by item 10 for the prompt's wording and theoperationparameter only),src/opendox/default_profile.py(prose only: itsBranchActionSubcommandsandBranchActionRouteExtensioncarrylandfrom the two branch-action modules, and its docstring and tuple comments now nameland),src/opendox/cli_branch_actions.py,src/opendox/serve_branch_actions.py,src/opendox/branch_session.py(its FR-033 comment only),src/opendox/web/views/branch-actions.js,src/opendox/web/app.js,src/opendox/web/index.html,tests/fixtures/web_boundary_census.yaml(three rows and the A and C totals;views/branch-actions.js327 -> 353 and A 19104 -> 19130 for item 10),tests/test_web_boundary.py(two pins: the land routes are addressed bybranch-actions.jsalone, and the control keys onland, never onsession), andtests/test_landing_guardrails.py(the surface nodes).Admitted collateral, minimal (for the holder's confirmation at READY):
tests/test_default_profile.py(6023619783item 1):test_the_default_contributes_the_runtime_command_opendox_runtime_buildsexpects["runtime", "submit", "land"], with its message updated. Nothing else in the file changes.tests/test_capability_honesty.py(6027633398):GOVERNEDgains"land": ("POST", "/actions/session/land")._assert_every_true_flag_answersexpects a composed host's map to lacksubmitandland.tests/test_lens_seed_actions.py(6027633398): intest_the_lens_of_a_real_standalone_serve_offers_neither_seed_action, the contributed-route manifest is now submit, then/actions/session/land-nonce, then/actions/session/land. There is still no seed route.src/opendox/web/views/account-menu.js(6069024568item 2, the chain T015 → T016):WRITE_ACTIONSgains"land". The census line count is unchanged.Same-kind enumeration collateral (pre-authorized,
6027633398):tests/test_submit_route.py::test_the_default_profile_contributes_the_route_and_its_mixin. Its assertionbindings == (_SUBMIT,)enumerated the default profile's contributed routes. It now asserts submit first, then the two land routes. No other assertion in the file changes.pyproject.toml's:312is not touched: the control lives in the existingviews/branch-actions.js, so the bundle stays at 43 files.Not done here
landin the openDox root README. T019 proves openxFactory's host unchanged.token=value. That errs on the safe side, and it is T015's rule, not changed here.Arc: neutral-product-standalone-operability
🤖 Generated with Claude Code