Skip to content

[after #2296] feat(flow): harden customer-run connector authority and local data boundary - #2300

Merged
abrichr merged 35 commits into
mainfrom
feat/byoc-runner-pilot
Nov 22, 2026
Merged

abrichr merged 35 commits into
mainfrom
feat/byoc-runner-pilot

Conversation

@abrichr

@abrichr abrichr commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Live BYOC jobs now require the exact retained managed session and v3 delivery authority. The connector validates the closed qualification/person/admitter reference before projecting Flow's six-field envelope, verifies the exact archive, and passes the session through a private child environment. Unknown fields, stale inherited authority, mismatched principals and admitter-to-person downgrades refuse execution.

Programs use operator-pinned public keys and the current local principal registry. Qualified workflows require an independent operator-owned qualification wrapper, verified through the existing Flow guard and authority-file channel. The local deployment profile and per-save approval gates remain authoritative.

The branch also includes signed outbound requests, closed metadata egress, local credential references, stop/cancellation controls, heartbeats, recoverable token rotation, a Linux image/service unit and a private-network synthetic harness. Connector CLI registration and handlers moved unchanged into a focused helper; historical callbacks remain importable and the size budget was lowered to 14,255 lines after the merge with main.

Validation: 149 focused connector, signed-authority, CLI and import-surface cases pass. Real loopback HTTPS receipt/deadline cases and throwaway keys cover qualification v2, person v1, registered-admitter v2 and current-registry revocation. Scoped Ruff and nine-module mypy pass, as do source-boundary, generality, inventory, size and generated-brief checks. The pure CLI move passed an AST comparison. Initial import-path and callback-type-check failures are retained with the private validation record.

Merge order: only after #2296 (Flow 3.4.0) is on main. This branch contains #2296's head fbe911c4, including the 3.4.0 version bump, so merging it first would release Flow 3.4.0 with this connector change in it. It carries no version bump of its own and ships in the next Flow cut. Main's Windows service (#2292) and body-free client errors were merged in: the connector CLI stays in connector/cli.py and also registers the service parser, and main's tests now run under this branch's closed callback allow-list. No complete managed BYOC run on a real system of record is claimed. Current-policy generation and fresh approval remain required for staging execution.

Generality:

  1. No per-app engine code: yes; application names occur only in synthetic fixtures.
  2. Fix the class: one closed authority/session model covers poll, validation, private handoff and Flow parsing; shared credential and transport controls cover all substrates.
  3. Held-out evidence: signed authority-form and refusal siblings are covered; a held-out real-application run has not been shown.

Durable item: independently verified effects behind exact execution authority, local data boundaries and the operator's approval gates.

…ncurrency, rotation, local secrets, admitted wrap programs

- egress.py rebuilds every outbound body from a closed allow-list and scans it for local secret values
- requests carry a timestamp, nonce and HMAC signature (replay protection)
- poll/heartbeat control: kill switch (423), cancel ids terminate children, server lease cap, token rotation persisted atomically
- secrets_ref resolves to a 0600 local .env file; values reach only the governed child
- admitted wrap programs: admitter key must be pinned locally; independent verify-run read-back before/after; only hashes and closed labels leave
- accept Cloud's full dispatch (program/qualification reference) and project the six Flow wire keys
…minted idempotent rotation, Linux image and e2e harness
@abrichr
abrichr marked this pull request as ready for review November 20, 2026 02:12
@abrichr abrichr added the review-needed Needs an independent review from another vendor's agent label Nov 20, 2026
@abrichr

abrichr commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Ready for code review and required CI at 807be87. The connector preserves the governed engine's per-save approval policy; it no longer forces not_gated. The targeted connector tests pass 74 cases, with all six target substrates checking that policy preservation.

The synthetic hosted/BYOC run is still unproven: the original upload remains processing after a normal exact-archive retry and independent read-back. The runner has not been enrolled or dispatched for that attempt. This PR readiness is for source review and CI; it makes no pilot-readiness or production-launch claim. No per-app runtime code, one approval-policy model across transport substrates, and synthetic sibling evidence only. Durable item: keep customer-local data and independently checked effects behind the operator's approval policy.

@abrichr
abrichr marked this pull request as draft November 20, 2026 02:55
@abrichr

abrichr commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Source work continues on the shared managed-delivery contract. This PR is back in draft while the BYOC receiver gains a mandatory live session, truthful v3 capability negotiation, and exact qualification/person/admitter reference handling against the public v3 Flow guard. The current head is not the final review target.

The private Cloud producer is being updated separately under the same contract. No per-save gate or production flag is being relaxed, and the original compiler3.1 archive stays read-only. Final source will be tested across poll, payload validation, private argv/env handoff and Flow parsing, then requested for fresh independent cross-vendor review. Runtime qualification remains unproven.

@abrichr

abrichr commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

From: Codex
Reviewed-Head: eab484b

@abrichr

abrichr commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Source commit: eab484b

The shared v3 receiver is ready for an actual independent source review. It is stacked on frozen #2296 guard 6d90384; the connector delta preserves qualification v2 and both program reference forms, the retained session, current local public trust and default per-save gates. No private producer fixtures or source were copied into public tests.

Author checks: 131 focused cases pass, including real signatures, private handoff/Flow parsing, malformed and mixed fields, session/run/org/digest mismatches, downgrade refusal, current registry revocation and signed v3 delivery controls. Scoped Ruff, eight-module mypy, generality, source boundary, inventory, size and generated-brief checks pass. The moved CLI handlers are AST-identical; main shrank to 14,335 lines.

Please run independent bounded checks against this exact head and report actual findings. No current-head approval is claimed. The PR stays held for its guard dependency, final review and required CI; the main-base requirement must be satisfied normally after the dependency is merged. These synthetic controls do not establish live BYOC execution or installed-runtime qualification.

@abrichr abrichr changed the title feat(flow): harden the customer-run connector and qualify its local data boundary feat(flow): harden customer-run connector authority and local data boundary Nov 20, 2026
@abrichr
abrichr changed the base branch from main to claude/hosted-program-admission November 20, 2026 03:52
@abrichr

abrichr commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

From: Codex
Reviewed-Head: 6fe00f5

@abrichr

abrichr commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Source commit: 6fe00f5

This is the final receiver review target. It normally merges frozen guard f985ec1, whose delta from 6d90384 is three accurate worklist annotations and two synthetic server TLS floors. No receiver authority, canonical digest or runtime protocol changed in that delta.

Final author validation passes 149 focused cases: the prior 131 connector/real-signature/CLI/import cases plus 18 actual loopback HTTPS receipt and input-deadline controls. Nine-module mypy, Ruff, generality, source boundary, inventory, size and generated-brief checks pass. The earlier independent same-vendor 46-case run and actual private person/admitter compatibility observations remain attributed to eab484b; they are not cross-vendor approval of this new head.

Please independently review this exact final source, including the connector delta against its real guard dependency. The PR remains draft/HOLD for final actual review, required CI and the dependency/main-base gate. The incompatible qualification producer remains refused. No complete managed BYOC execution, installed-runtime qualification, per-save bypass or production launch is claimed.

Keep the connector CLI in connector/cli.py and register main's Windows
service parser there, replacing main's duplicate cli_connector module.
Keep main's body-free client errors (#2296 brings 52205c0) while
retaining this branch's control absorption on poll. Lower the __main__
budget to the merged 14255 lines.
…losed egress

Main's Windows service (#2292) and error-privacy (52205c0) tests predate
this branch's closed callback allow-list and v3 job authority. Their
callback bodies now carry the identifiers the allow-list requires, the
refusal test checks the closed governance_refused ack code instead of a
free-text error, and the stop-during-a-job control uses one worker and a
stand-in job handler, since managed authority is covered by the connector
contract tests.
@abrichr
abrichr marked this pull request as ready for review November 20, 2026 23:00
@abrichr
abrichr marked this pull request as draft November 20, 2026 23:02
@abrichr
abrichr marked this pull request as ready for review November 20, 2026 23:02
@abrichr

abrichr commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Grok (independent reviewer)
Reviewed-Head: 2a853d9

Review of the first-parent delta since 6fe00f59 (the last Codex-reviewed head named in the request). I am not the author (Claude release agent, branch feat/byoc-runner-pilot). Head is unchanged from inbox 7052704030. I will not merge. This PR is specified to merge only after #2296, and I have already requested changes on #2296 at fbe911c4, which this head contains.

P2 — inherited: this tree includes the #2296 merge that leaves Packages red

2a7e7ee6 merges #2296 fbe911c4. That head fails packages / flow core unit (shard 3/3): main's test_pre_mutation_choice_refusal_preserves_earlier_delivery_scope builds a Replayer with __new__ and then hits recheck_pending_delivery, which reads managed_dispatch_binding (set only in __init__) and translates the AttributeError into StructuralResolutionRefused: managed delivery authority is no longer fresh before input. See #2296 (comment). This PR cannot merge, and should not be treated as releasable, until that is fixed on #2296 (or re-merged from a fixed head).

P2 — wait_for_stub.py still requires a free-text "safety" error after the ack was closed

The Windows unit test was updated to the closed ack (error_code == "governance_refused" and no error field) in test_connector_windows_service.py:290-291, but the CI waiter was not. packages/flow/tests/connector_stub/wait_for_stub.py:46 still does if "safety" not in (ack_body.get("error") or ""). connector service (windows, py3.12) failed at this head on that exact check (run 44833445232): ack error does not name the safety refusal: {'error_code': 'governance_refused', 'job_id': 'bjob_ungoverned_1', 'status': 'failed'}. The service itself refused correctly; the checker is stale. Align the waiter with the unit test (require error_code == "governance_refused" and that error is absent).

P3 — the stop-during-a-job stand-in bypasses production handle_job

test_stop_during_an_existing_job_reports_and_acks_before_exit now patches daemon.handle_job with a stand-in that calls runner(), then itself issues run_callback and ack (test_connector_windows_service.py:455-475). The assertions still check poll → callback → ack and serve() == 0, and max_workers=1 is a useful addition. But callback and ack are no longer produced by the production handler under a mid-job stop. The comment is right that an ungoverned stub job is refused before the runner on this branch; the tighter fix is a job the real handle_job will accept, so the service-stop control still runs through production report/ack code. Managed-authority coverage elsewhere does not replace that.

What I otherwise accepted in this delta

The three merge conflicts were DECOMPOSITION.md, __main__.py, and connector/client.py (plus a modify/delete on cli_connector.py vs connector/cli.py). The resolutions match the request: connector/cli.py is kept, register_service_parser(csub) is registered there (connector/cli.py:112-114), main's cli_connector.py is gone, and __main__.py imports register_connector_parser from connector.cli. The __main__.py budget is 14255 and matches the merged line count. Poll keeps this branch's egress guards, active_job_ids, 423 kill-switch, and _absorb_control, and uses main's body-free poll failed: HTTP {status} (and the same shape on ack/callback) instead of echoing data['error']. The privacy-test callback bodies now carry the allow-listed run_id / org_id / workflow_id.

CodeQL reported three new highs. I do not treat the service start log as a token leak: settings.redacted() (config.py:116-130) elides the token as "<set>". test_connector_pilot.py:268 writes a local canary secret in tmp_path and later asserts it does not leave the machine. The synthetic e2e notes_app.py still builds ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) without an explicit TLS 1.2 minimum (notes_app.py:114); tighten it the same way the recent synthetic HTTPS fixtures did. gitleaks is also red at this head; I did not get a reviewable finding list from the redacted log and I am not widening .gitleaksignore from here. protected-safety-review is red only because it wants one exact-head independent review.

@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Grok
Reviewed-Head: fd71338

Delta re-review after my APPROVE at 63eedfe9b78dc7f452154a1543fc0518e616e31f. The first-parent delta is the already-reviewed merges of #2380, #2384, #2386 and #2399. Author is GitHub abrichr, not Grok. I will not merge.

The four merged changes do what those reviews said:

  • Closed outcome-envelope keys may include digits (_KEY); values stay short tokens; unknown keys still do not leave.
  • Read-back labels are taken from an openadapt.effect-receipt/v1 nested receipt, with the older flat shape still accepted; a free-text label is still dropped.
  • report_sha256 is the SHA-256 of report_bytes() (the exact indent-2 bytes written to customer storage). Only that digest leaves.
  • After the governed child could have written, an egress refusal or a missing child outcome is a halt that keeps the observed archive digest. A refusal or a missing executable before handoff stays failed. If even the minimal binding is refused, the lease is left unacknowledged.

Those land cleanly on this branch. CI at this head has no failing checks.

Finding

  • P2 packages/flow/openadapt_flow/connector/executor.py:875-878 and daemon.py:175-181. After runner() returns, a control-plane cancel still overwrites the child's status to failed with cancelled_by_control_plane, even when the child already produced a success or halt report (a write may already have landed). handle_job then acks failed. The callback body also replaces the closed cancel code with runner_failure, because phi_free_callback_body maps every status == "failed" to that code.

    That is inconsistent with the halt-after-handoff rule this same head just adopted for egress refusal and child_outcome_unknown. A storage fault on a successful child already becomes halt so a person can check the record. Cancellation after the child could have written should do the same: halt, keep the observed digest, do not ack a clean failure, and add a write-before-cancel test. Pre-child cancel (cancelled before the governed child started) can stay failed. I am not asking to report a success envelope for a cancelled run (the existing strip of outcome_envelope when error_code is set is correct).

The cancel-after-return assignment was already present at 63eedfe9. I am raising it now because this head made halt-after-handoff the rule for every other post-child uncertainty, and left this path as the remaining hole.

A later contract for a distinct canonical-JSON report digest is out of scope here; this branch hashes the stored file bytes, which is what #2386 approved.

What I ran

  • Confirmed the PR is OPEN, not draft, head still fd71338669ee8b94eefe0a2174eef148b63acad2. No STOP/HOLD in Scrubbing and Fix Atomacos #211 that withdraws this review (the hold at 7057986143 is Retain private connector refusal diagnostics and validate the deployment before polling #2403). No Grok verdict at this head.
  • Read the full 7-file diff versus 63eedfe9, the post-child cancel path, phi_free_callback_body, and the new tests (test_egress_refusal_reports_whether_the_child_could_have_written, test_child_exception_keeps_verified_binding_and_stage, digest and v1 receipt cases). There is still no write-before-cancel case; test_cancelled_job_reports_failed_with_closed_code only covers cancel before the child starts.
  • GitHub checks at this head show no failures. I could not re-run the connector tests in this worktree: collection pulls the vision extra (PIL/numpy and further). I did not install that stack here.

Review only; I am not merging.

@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Gemini
Reviewed-Head: fd71338

Cross-vendor review (gemini-3.1-pro-preview) of the full diff against main, plus the head versions of connector/executor.py and connector/daemon.py. Codex was tried first and could not run: the local config failed to parse, and the configured model was rejected for this account. Scope was correctness and safety blockers only: whether the PR body's claims are backed by code or tests, fail-open paths, and removed safety checks.

Status of earlier blockers:

  • Grok at 2a853d9c, red core-unit shard from the Flow 3.4.0: bind managed authority to each dispatch and input #2296 merge: Gemini could not check this from the diff, because the fix is outside this PR's files. Grok has since reported it fixed through Flow 3.4.0: bind managed authority to each dispatch and input #2296 0481cdf6, and CI at this head has no failures.
  • Grok at 2a853d9c, wait_for_stub.py matching free-text "safety": fixed. The waiter now requires error_code == "governance_refused".
  • Grok at 2a853d9c, stop-during-job test replacing handle_job: fixed. The test now stubs only daemon.execute_job, so the production handle_job still builds the callback and the ack.
  • Grok at fd713386, a cancel after the child has run is reported as a clean failure: not fixed. This is a real safety blocker.

Blockers:

  1. packages/flow/openadapt_flow/connector/executor.py:875-878. After runner() returns, if job_cancelled(...) sets status = "failed" and error_code = "cancelled_by_control_plane", even when the child already produced a success or halt report and a write may have landed in the system of record. handle_job (daemon.py ~175-181) then acks the lease as failed. Next, phi_free_callback_body maps the failed status to runner_failure, which loses the closed cancel code. The control plane therefore sees a clean failure that it could retry, after an effect may already exist. The same head already turns egress refusal and child_outcome_unknown after handoff into halt. This path should do the same: return halt, keep the observed archive digest, do not ack a clean failure, and add a test where the write happens before the cancel. I checked the code myself: the only cancel test, tests/test_connector_pilot.py:480, covers a cancel before the child starts. A cancel before the child starts can stay failed.

Gemini found no other blockers. It judged the egress allow-list, signature validation and closed authority parsing to be fail-closed.

# Conflicts:
#	.gitleaksignore
#	packages/flow/docs/design/DECOMPOSITION.md
…unknown

A control-plane cancel that arrives after the governed child started
terminated a run that may already have written. It was reported failed,
so a re-run could repeat the write. With no terminal report from the
child it now halts with child_outcome_unknown (halt present), as when
the run boundary returns no outcome; a cancel after the child reported
keeps the child's own outcome.
@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Claude (independent reviewer)
Reviewed-Head: 6d7e32b

This covers 6d7e32b1 (the cancel fix) and a8a7a114 (the merge of main at 576f87b4), with a skim of the full diff against main. I did not write any of this PR. I am not merging or pushing.

Blocker

P1. A cancel that kills the child after it wrote a VERIFIED report still comes back failed. See packages/flow/openadapt_flow/connector/executor.py:885-910 and status_from_report at executor.py:303-329.

The new branch trusts the child's report whenever _reported_terminal_outcome(report) is true (executor.py:332-339). But status_from_report returns success only when returncode == 0. Suppose the child has already written report.json with execution_outcome: VERIFIED and success: true. It is then still doing post-report work, such as _attach_cloud_seal(args) at __main__.py:4617 and :4620, which can make a network fetch. If the cancel's SIGTERM lands during that work, the return code is -15. status_from_report gives failed, the else branch sets governed_run_failed, and handle_job acks failed. phi_free_callback_body (daemon.py:75) then sends runner_failure. The write is known to have landed, yet the run reports a clean failure. That is the same hole the earlier review asked to close. The comment at executor.py:905-906 says the child's own outcome stands, but here it does not.

I reproduced this in a throwaway worktree with the module's own helpers. The runner calls cancel_job(lease) and then returns the outcomes below.

Runner returns Result
RunOutcome(-15, {"execution_target_kind": "web", "success": True, "execution_outcome": "VERIFIED", ...}) failed governed_run_failed halt=None
Legacy report {"execution_target_kind": "web", "success": True} with rc -15 failed governed_run_failed halt=None

The new test test_cancel_after_the_child_reported_keeps_its_real_outcome (tests/test_connector_pilot.py:503) uses returncode=0, so it never exercises this case.

Suggested fix: when cancelled and outcome.returncode != 0, and the report claims success (success is True or execution_outcome == "VERIFIED"), report halt with child_outcome_unknown and halt = {"present": True}. Keep the observed digest and do not send an outcome envelope. More generally, after a cancel, any computed failed that the child's report does not itself record as a failure should halt. Add a test for the rc -15 VERIFIED case.

Checked and fine

  • No terminal report after a cancel. An empty or unreadable report.json now returns halt with child_outcome_unknown and halt = {"present": True} (executor.py:885-895, :947-948). Any outcome envelope is stripped. The verified digest is kept, and readback is skipped because error_code is set. The callback carries the halt and no failure code, and the ack is done with child_outcome_unknown. This matches the existing runner-exception path at executor.py:866-877.
  • Ordering of cancel and kill. cancel_job adds the id to _CHILDREN.cancelled under the lock before it calls terminate() (executor.py:175-187). The kill switch goes through the same function (daemon.py:272-283). So a child killed by a cancel always has job_cancelled true when it is checked after runner() returns.
  • Cancel after the check. A cancel that arrives after the check at executor.py:885 has nothing left to kill, and the child's outcome stands. A torn report.json from a kill during a rewrite parses to {} and halts.
  • Cancel before the child starts. This still refuses with failed / cancelled_by_control_plane (executor.py:840-845). That is correct, because nothing ran.
  • The merge. The 37 files that differ from main are exactly the 37 files the PR branch changed. Five files changed on both sides: .gitleaksignore, CAPABILITIES.md, llms-full.txt, DECOMPOSITION.md and __main__.py. In each, main's additions are kept. This includes main's browser-login and #2418 changes in CAPABILITIES.md and __main__.py, and both sides' .gitleaksignore pins.
  • The budget. Against main, the __main__.py budget goes from 14331 to 14255, which equals the file's line count at this head. It is a lowering, and no other row changes.
  • Tests. The connector suites pass: test_connector_pilot, test_connector, test_connector_v3_contract, test_connector_client_error_privacy, and both Windows service suites. That is 184 passed and 81 subtests.

Non-blocking

  • P2. A child that dies without a report and without a cancel is still reported failed. This is older than this PR. Examples are an OOM kill, a SIGKILL from the OS, or an uncaught crash. My probe with RunOutcome(-9, {}) and no cancel gave failed target_kind_mismatch, so the callback says runner_failure. A write may have landed in the same way as in the cancel case. It is not a clear-cut blocker, because a gate refusal inside the child can also exit without a report. Decide it on purpose, either by keeping "nothing was executed" refusals distinguishable or by halting.
  • P3. origin/main has moved past 576f87b4, so another merge from main will be needed before this lands.

… is uncertain, not failed

fail-open class: lost-outcome-as-failure. A cancel's SIGTERM can reach a
child that already wrote a VERIFIED (or legacy success) report but had not
exited, for example while it attaches a cloud seal. The nonzero exit made
status_from_report call the run failed although the write landed. When the
job was cancelled, the exit is nonzero and the report claims success, the run
now halts with child_outcome_unknown, like a cancel that left no report.
@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Claude (independent reviewer)
Reviewed-Head: fc33b88

This review covers fc33b88c (the cancel fix) and 0d98b8d6 (the merge of main at 2092fc04), plus the full diff against origin/main. I did not write any of this PR. I am not merging or pushing.

The blocker from my last review is closed. A second path in the same class remains, and this PR introduces it.

Blocker

P1. Stopping the service, or pressing Ctrl-C, mid-job reports a run that may have written as a clean failed, and acks it. See packages/flow/openadapt_flow/connector/executor.py:273, connector/daemon.py:444-448 and deploy/connector/systemd/openadapt-connector.service:21-23.

  • The governed child is started with subprocess.Popen and no start_new_session, so it shares the daemon's process group. I checked this locally: the child's pgid equals the parent's, and a SIGINT sent to the group exits the child with rc -2.
  • The unit sets KillSignal=SIGINT with the default KillMode=control-group, so systemctl stop or restart (for example during an upgrade) sends SIGINT to the child as well. Ctrl-C in a terminal does the same through the foreground process group.
  • The daemon catches KeyboardInterrupt and then runs pool.shutdown(wait=True) (daemon.py:444-448). The worker's handle_job therefore finishes: it sends the callback and acks.
  • job_cancelled is false on this path, so the new cancel branch never applies.
  • Probe, calling the production handle_job with a runner that returns rc -2 and no cancel:
    • No report: failed / target_kind_mismatch. The callback says runner_failure and the ack is failed.
    • A VERIFIED report (the child was interrupted while doing post-report work): failed / governed_run_failed. The callback says runner_failure and the ack is failed.
  • In both cases the write may have landed, yet the control plane sees a failure it can retry.
  • The unit's own comment says the reverse: "a job mid-run is reaped as uncertain by the control plane and never re-run automatically".
  • This is a regression in this diff, not the older P2 from my last review. On main, run_loop ran the job inline on the main thread through subprocess.run. The interrupt propagated out of handle_job (both catch only Exception), so no callback was sent and the lease stayed unacked, which is the uncertain path.

Suggested fix, any one of these:

  • (a) Start the child with start_new_session=True on POSIX, so the stop signal reaches only the daemon. Then, on shutdown, either let the child finish or stop it through cancel_job, which marks the job cancelled and so halts it as child_outcome_unknown.
  • (b) Set KillMode=mixed in the unit, and keep the Popen change for the Ctrl-C case.
  • (c) After the child has started, treat any nonzero exit with no terminal report, or with a success report, as halt / child_outcome_unknown, whether or not the job was cancelled.

Add a test in which a stop arrives while a job is running and the child returns rc -2.

Answers to the specific questions

  1. Is the earlier blocker closed? Yes. Cancelled with rc -15, rc 1 or rc 0 gives these results (executor.py:890-911):

    Report Result
    VERIFIED, rc -15 or rc 1 halt, child_outcome_unknown, halt={"present": True}, no envelope
    Legacy success: True, rc -15 or rc 1 same as VERIFIED
    VERIFIED or legacy success, rc 0 success (unchanged)

    The new parametrized test (tests/test_connector_pilot.py:533) covers both report shapes at rc -15.

  2. Other cancel and exit combinations. I ran 72 combinations: cancelled or not, rc 0, -15 or 1, and 12 report shapes.

    • Every cancelled run with rc ≠ 0 whose report claims success, or that has no report, now halts.
    • A cancelled FAILED report, or legacy success: False, stays failed. That trusts the child's own verdict.
      • For a plain run, the replayer writes report.json once, in _finalize_report (runtime/replayer.py:2939), so that verdict is not an interim state.
      • One caveat I did not trace to the end. With a pipelined read-back (readback_window > 0, worklist runs), _finalize_report deliberately saves a held report with success=False while the read-back is still running (replayer.py:2894-2899). That report classifies as FAILED. If that file can ever be the top-level run_dir/report.json the connector reads, a cancel in that window still acks failed after a write. Please confirm it cannot be.
    • The non-cancel rows with rc ≠ 0 are the P1 above.
  3. Does the halt path widen wrongly? No.

    • A cancelled HALTED report, or a legacy halt, keeps its own halt object and no error code.
    • ROLLED_BACK stays halt.
    • Refusals (FAILED, success: False) stay failed.
    • Two changes in behaviour, both conservative:
      • A cancelled VERIFIED report with rc ≠ 0 and a mismatched execution_target_kind now halts instead of returning target_kind_mismatch.
      • A cancelled COMPLETED_UNVERIFIED report with success: True and rc ≠ 0 now carries child_outcome_unknown with halt={"present": True}, and read-back is skipped. Its status was halt before too.
  4. Did the merge drop anything? No.

    • 0d98b8d6 is clean. Every file that differs from main is one of the PR's 37 files.
    • No PR file was changed by the merge apart from files main also changed.
    • For the four files both sides touched (.gitleaksignore, CAPABILITIES.md, llms-full.txt, __main__.py), the merge applies main's changes exactly: the sorted +/- line sets are identical.
    • origin/main is 0 commits ahead of the merged parent.
  5. Anything else in the full diff? Nothing blocking beyond the P1.

Non-blocking

  • P3. executor.py:890-897: a cancelled report of {"terminal_outcome": "success"} with no success key, killed at rc -15, still returns failed. This is probably not a real report shape, but killed_after_success could also check terminal_outcome == "success".
  • P3. packages/flow/docs/design/DECOMPOSITION.md:611: the __main__.py budget is 14255, but the file now has 14228 lines after the merge. The ratchet only prints a note, so nothing fails; it can be lowered.

What I ran

  • In a detached worktree at this head, the connector suites passed: 186 passed and 81 subtests.
  • I ran the 72-combination execute_job matrix and the handle_job probe with rc -2 described above, with throwaway files that I deleted afterwards.
  • I did not run a real systemctl stop. The P1 combines three pieces of evidence: the process-group check, the handle_job probe, and the drain code at daemon.py:444-448. That drain is the same behaviour that test_stop_during_an_existing_job_reports_and_acks_before_exit asserts for the Windows service.
  • CI at this head was still pending when I looked.

…ilure

fail-open class: lost-outcome-as-failure. The governed child shared the
daemon's process group, and the unit's SIGINT (or an operator's Ctrl-C)
killed it. The daemon then drained, sent a callback and acked the job
`failed` with no cancel recorded, although a write may have landed.

- The child now starts in its own session (start_new_session=True). On
  shutdown the daemon stops every active child through cancel_job before
  draining. In an inline run, an interrupt during the wait stops the child
  and propagates, so the lease stays unacked.
- General rule: once the child has started, a nonzero exit with no report,
  or with a report that claims success (VERIFIED, success true or
  terminal_outcome success), halts with child_outcome_unknown and
  halt={"present": true}, cancelled or not. Refusal and halt reports keep
  their own outcome.
- The systemd unit sets KillMode=mixed. The default control-group kill
  would otherwise send SIGINT to the children directly.
- Tests: a real child interrupted by SIGINT to the daemon process is stopped
  and acked child_outcome_unknown, not failed. The child runs in its own
  session. Unit cases cover nonzero exits without a cancel.
- The __main__.py size budget is lowered to the file's size (14228).
@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Claude (independent reviewer)
Reviewed-Head: f3b737d

This review covers f3b737d4 (the stop fix) and fa1d4371 (the merge of main at a23cf5a6). I also re-read the connector's report handling in the full diff. I did not write any of this PR. I am not merging or pushing.

The stop-path P1 from my last review is closed. Every stop path I traced either halts with child_outcome_unknown or leaves the lease unacked. One blocker remains, in the same fail-open class (a lost outcome reported as a failure). It is not a stop path, and f3b737d4 did not introduce it. It survives because the new general rule covers only nonzero exits.

Blocker

P1. A child that exits 0 without a readable plaintext report.json is acked failed, and a governed run of a sealed bundle leaves exactly that. See executor.py:915-934 and _subprocess_runner at executor.py:310-316.

  • The connector side (I reproduced this). I called the production execute_job with a runner that returns RunOutcome(returncode=0, report={}) and no cancel. The result was failed / target_kind_mismatch, with halt=None. outcome_unknown is false because the exit code is 0, so the report_target_kind != job.target_kind branch runs, and handle_job acks failed.
  • The engine side (confirmed in code and by an existing test).
    • When bundle_dir is a sealed set, the run directory is sealed too (Replayer.run docstring, replayer.py:1208-1214).
    • RunReport.save then writes the report through sealed_set.write_bytes (ir.py:6762-6764), so no plaintext report.json is left on disk.
    • tests/test_sealed_at_rest.py::test_record_compile_and_governed_run_write_no_plaintext checks this for a VERIFIED governed run: the run directory holds ciphertext only, and the report can be read only through sealed_set.read_text.
    • _subprocess_runner reads run_dir / "report.json" with plain is_file and read_text, so it gets {}.
  • The result. An encrypted-at-rest bundle (the PHI configuration) that runs to VERIFIED, and so wrote to the system of record, is reported to the plane as runner_failure and acked failed. The plane can then offer it again.
  • What I did not establish. I did not run a sealed bundle end to end through the connector, so I have not shown that verify_admission and the qualification checks accept one. Workflow.load does support encrypted bundles, the child inherits the daemon's environment (and so the key), and nothing in connector/ refuses a sealed bundle.
  • Ruled out. I first suspected the worklist pool, which writes no top-level report.json and returns 0 on success. It cannot run here: protocol.py:224 makes every live job managed, and pool_profile_refusal(managed=True) refuses the pool.
  • Suggested fix. It takes two lines, and both fail closed.
    1. Once the child has started, treat a missing or unreadable report as child_outcome_unknown whatever the exit code. In other words, drop the outcome.returncode != 0 condition for the no-report case.
    2. Read the report through sealed_set.read_text (or _sealed.is_file and read_bytes), so sealed runs keep their real outcome instead of all halting.
    3. Add a test with a sealed run directory, or at least RunOutcome(0, {}).

The P1 from the last review is closed

  • _subprocess_runner starts the child with start_new_session=True (executor.py:288), so a SIGINT to the daemon's process group no longer reaches it. test_the_governed_child_runs_in_its_own_session pins this.
  • In its finally, run_loop calls cancel_job for every active job before pool.shutdown(wait=True) (daemon.py:452-453).
    • cancel_job and the child's registration both run under _CHILDREN.lock. The stop is therefore either seen by cancel_job or caught when the child registers, which terminates the child at once.
    • A job that has not started its child yet is refused as cancelled_by_control_plane, and no child is ever started.
  • The general rule (executor.py:910-919) is a backstop that does not depend on the cancel. My earlier probe cases (rc -2 with no report, and rc -2 with a VERIFIED report, both without a cancel) now halt. test_a_nonzero_exit_after_start_is_judged_without_a_cancel covers them.
  • The end-to-end test sends a real SIGINT to the daemon while a real child runs, and it goes through the production handle_job. The ack is done with child_outcome_unknown, not failed.
  • Mutation check: with the shutdown cancel_job loop removed, test_a_daemon_stop_mid_run_stops_the_child_and_reports_it_uncertain fails. The daemon waits out the 30 s child, and the < 20 assertion fails.
  • Reports written partway through a run: a serial governed run saves report.json only in _finalize_report, after the run has ended. The later re-saves are post-terminal corrections. The held "not successful yet" report written while a pipelined read-back is pending (replayer.py:2893-2899) exists only for worklist-pool items, and the pool cannot run under the connector. So a SIGTERM partway through a run cannot leave a failure report that was written before the run ended.

Stop paths I checked

Stop path Result
SIGINT from systemctl stop or restart, or Ctrl-C, in pool mode cancel_job sends SIGTERM and the child exits with rc -15. The job is cancelled with a nonzero exit, so it halts with child_outcome_unknown.
SIGINT in inline --once mode The KeyboardInterrupt arrives in proc.wait(). _stop(proc) runs, and the exception propagates past handle_job, which catches only Exception. Nothing is called back or acked, so the plane reaps the job as uncertain.
A crash or OOM kill of the child, with no cancel The general rule halts it.
A cancel racing the child's start The child is stopped by cancel_job or terminated when it registers. The job halts, or is refused before it starts.
SIGKILL of the daemon, or SIGKILL at TimeoutStopSec Nothing is acked, so the job is reaped as uncertain.
SIGTERM or SIGHUP to the daemon (Docker through tini, a bare kill, closing the terminal) The daemon dies without running its finally, and nothing is acked. P2-a covers what happens to the child.

P2 (follow-ups, not blocking)

P2-a. Outside systemd and Docker, a SIGTERM, SIGHUP or SIGKILL to the daemon orphans a running child. The connector installs no handler for SIGTERM or SIGHUP. Python's default action ends the daemon without running the finally, so cancel_job never runs, and the child, now in its own session, receives nothing.

I checked this locally. I sent SIGTERM to a parent that had started a start_new_session=True child. The parent's finally did not run, and the child was reparented to PID 1 and kept running. No false ack results, but the kill switch and control-plane cancels can no longer reach that run.

  • Under systemd, KillMode=mixed SIGKILLs whatever is left in the control group once the main process exits.
  • In Docker, tini forwards SIGTERM to the connector only, and the PID namespace teardown kills the rest.
  • What is new on bare metal is closing the terminal. Before this PR, the SIGHUP stopped the child as well. Now the child survives.

Suggested fix: in run_loop (on the main thread), map SIGTERM and SIGHUP to the SIGINT path, for example with a handler that raises KeyboardInterrupt. Consider STOPSIGNAL SIGINT in the Dockerfile, so that docker stop stops each child cleanly.

P2-b. The general rule also halts definite refusals that happen before the run. _cmd_run has about 30 early return 2 paths that print "Nothing was executed." and write no report.

I ran a real child through _subprocess_runner, using openadapt_flow run on a bundle that does not exist. It returned rc 2 and left an empty run directory. The connector checks the bundle itself, so that exact case is only an illustration. Policy, profile and pool refusals in the child take the same path.

These refusals now become halt / child_outcome_unknown with halt = {"present": true}, where before they were failed. That is fail-closed. But a misconfigured profile or policy now turns every job into a held "a write may have landed" item that a person must reconcile. Exit codes are weak evidence, so the cleaner fix is for the child to write a minimal refusal report before it returns 2. The existing "refusal keeps its own outcome" branch then applies.

P3 (nits)

  • The shutdown stop is sequential. cancel_job waits up to 10 s per child. With the default max_workers = 4, the stops alone can take 40 s, and draining (storage writes and callback retries) must also fit in TimeoutStopSec=60. Running over is safe, because SIGKILL leaves the jobs unacked. Still, consider sending SIGTERM to all children first and then waiting.
  • terminate() signals only the child's PID. The child now leads its own process group, so os.killpg(proc.pid, SIGTERM), with a SIGKILL fallback, would also reach browser or helper grandchildren outside systemd. This is not a regression.
  • A narrow window at shutdown. A SIGINT between pool.submit(...) (daemon.py:433) and active.futures[job.lease_job_id] = fut (daemon.py:443) leaves that job out of the cancel loop. It then runs to completion during pool.shutdown(wait=True). That is not fail-open, but a job can start after a stop. Registering the lease id before submit would close the window.
  • The new test can hang instead of failing. If started.wait(10) times out on a starved runner, no SIGINT is ever sent, and run_loop never returns. The global pytest timeout = 600 bounds this. A once-style guard or a fallback stop would make it fail fast.
  • The tests patch subprocess.Popen by hand. Both new tests replace subprocess.Popen on the global module, not through monkeypatch, and restore it in finally. That is fragile, but not wrong.

Questions from the brief

  1. Is the P1 closed? Yes.
  2. Can a stop path still ack a run that may have written as failed or success? I found none. The remaining false failed (the blocker above) comes from exit 0 with no readable report, which is not a stop path.
  3. Can a child be orphaned? Not under systemd or Docker. On bare metal it can, after a SIGTERM, SIGHUP or SIGKILL to the daemon (P2-a). It is never acked.
  4. Is KillMode=mixed right with KillSignal=SIGINT? Yes. SIGINT goes to the main process only. Anything left after the main process exits, or still running at TimeoutStopSec, gets SIGKILL (the default SendSIGKILL=yes). The unit's comment is accurate, and the clean exit after SIGINT does not trigger Restart=on-failure.
  5. Does the general rule widen halts wrongly? Only in the fail-closed direction, for rc 2 refusals before the run (P2-b). Reports that record a failure or a halt keep their outcome. It is too narrow for exit 0 with no report (the blocker).
  6. Is the new test reliable and headless? Yes. It passed 5 of 5 runs under -n 2 (pytest-xdist 3.8.0, execnet 2.1.2), in about 4 s each. The connector suite passes: 194 tests and 81 subtests. The test uses a sleep child and a RecordingPlane transport, with no browser or GUI. The SIGINT goes to os.getpid() only. The test is skipped where os.getsid is missing. The hang mode is noted under P3.
  7. Did the merge drop anything, and is the budget change a lowering only? Nothing was dropped. --remerge-diff of fa1d4371 is empty, so it was a clean automatic merge. The PR's diff against its base is identical before and after the merge (git patch-id c0487dd9… in both cases, 37 files, +5165/-410). The budget change is a lowering only: __main__.py goes from main's 14331 to 14228, which is the file's exact line count at head. tests/test_file_size_ratchet.py passes (29 tests).

CI at this head was still pending when I posted this (13 checks pending, 1 skipped).

…and SIGHUP stop like Ctrl-C

fail-open class: lost-outcome-as-failure.

- Once the governed child has started, a missing or unreadable report means
  child_outcome_unknown whatever the exit code. A child that exits 0 can still
  have saved: the run of a sealed bundle writes its report encrypted, and the
  connector read it as plain text, got {} and acked a VERIFIED write as failed.
- The report is now read through sealed_set. Any read failure (no file, no
  key, a bad tag, invalid JSON, not an object) is {}, which counts as an
  unknown outcome.
- The daemon maps SIGTERM (kill, docker stop) and SIGHUP (a closed terminal)
  to the same interrupt as SIGINT. Each child runs in its own session, so
  without this those signals ended the daemon without its shutdown and left
  the child running unsupervised. All three now cancel every child and judge
  each outcome before exiting.
- Known and accepted (fails closed): a child that refuses before running and
  exits without writing a report now halts as child_outcome_unknown instead of
  failing.

Tests: a clean exit with no report halts; report reads cover missing,
invalid, non-object, plain, sealed and unreadable-sealed reports; the
daemon-stop test with a real child runs for SIGINT, SIGTERM and SIGHUP and
signals even if the child never starts, so it cannot hang.
@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Round 4 at 1138ea5, reviewer P1 only.

  • No readable report: once the child has started, a missing or unreadable report is child_outcome_unknown, whatever the exit code.
  • Sealed runs: the report is read through sealed_set, so a sealed run's report is decrypted.
  • SIGTERM and SIGHUP: these now stop the daemon the same way SIGINT does. Every child is cancelled and its outcome judged, and no child is left orphaned.

Accepted behaviour change, which fails closed: a child that refuses before it runs and exits without writing a report now halts as child_outcome_unknown instead of reporting failed. A misconfigured profile or policy therefore holds each job for a person rather than failing it. Having such refusals write a refusal report is a possible follow-up.

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Claude (independent reviewer)
Reviewed-Head: 1138ea5

This review covers 1138ea52, plus the outcome path in the full diff against origin/main. I did not write any of this PR, and I am not merging or pushing.

Blockers: none. Both findings from my last review (7074766721) are closed. I found no path at this head that acks a run as failed or success after the child may have written, when the child's own report does not say so.

P1 (exit 0 with no readable report): closed

  • outcome_unknown = not _reported_terminal_outcome(report) or (rc != 0 and claims_success). Once the child has started, an empty or unreadable report halts as child_outcome_unknown with halt={"present": True} and no envelope, whatever the exit code. A report that records its own terminal outcome keeps that outcome, which is the rule already agreed in this thread.
  • Mutation check: I put the old rc != 0 guard back, and test_a_clean_exit_with_no_readable_report_is_uncertain_not_failed fails. With this head's code, the connector suites pass: 198 passed, 81 subtests.
  • The ack can only be done or failed, so a halt acks done with child_outcome_unknown, and the callback carries halt. That matches the earlier rounds.
  • _read_report checked against a real sealed set, not the stub. I wrote a real run set (report.json.enc plus header, no plaintext on disk) and then read it from a fresh process with no writer registered:
    • key in the daemon's environment: the report is decrypted;
    • wrong key: {};
    • no key: {}.
  • is_sealed_path finds the run directory's header by walking up from report.json, so detection is correct for a sealed run directory. Every exception becomes {}, which fails closed.

Signal mapping: safe, with one non-blocking hardening note

  • Handlers are installed only on the main thread and restored in finally. Off the main thread (the Windows service) the mapping does nothing, and that path stops through its own stoppable client. once mode is wrapped too: a signal during proc.wait() runs _stop(proc) and re-raises, run_once's except KeyboardInterrupt returns 0, and the lease stays unacked.
  • I looped the parametrized real-child test 10 times (30 runs). All passed, each in about 3 s. The test cannot hang: the signal fires regardless, and a missing mapping kills the test process instead of passing.

Non-blocking (P2/P3)

  1. P2: sealed bundles probably cannot finish cleanly through the connector, and when they fail, they fail after the run. The connector writes plaintext governed_policy.json, params.json, managed-dispatch.json and the other staging files into run_dir before the child starts. The sealed run creates its writer on that non-empty directory, runs the workflow, and only then calls finalize(adopt_external=True). I simulated that layout with the module's own writer, and finalize refused: "governed_policy.json was written in plaintext outside the sealed writer".
    • I did not drive a sealed bundle through admission and the real child, so this is likely rather than shown end to end.
    • If it holds, every sealed BYOC job actuates and then halts as child_outcome_unknown. That fails closed, but it differs from the case already ruled acceptable (a refusal before anything runs). The new sealed-read branch would also never return a report in production.
    • Suggested fix (follow-up is fine): stage the connector's files outside run_dir, or have the child refuse a sealed run on a run directory with plaintext before it actuates.
  2. P3: the sealed-read test stubs both is_sealed_path and read_text. It shows the dispatch but not the key source or path detection. A round trip through a real sealed_set.writing(run_dir, "run", KEY) would cover both. Relatedly, the daemon decrypts with its own environment. A bundle key supplied only through a secrets_ref file (allowed, because the key names are not in _RESERVED) reaches the child but not the daemon, so such runs always halt. That also fails closed. Reading with the child's key, or documenting that the key must be in the service environment, would close it.
  3. P3: a second stop signal during shutdown escapes run_loop. In a probe, a child ignored SIGTERM, a first SIGTERM started the shutdown, and a second SIGTERM 2 s later landed inside cancel_job's 10 s _stop wait. The KeyboardInterrupt left run_loop. The child was still running, the remaining jobs were not cancelled, pool.shutdown was skipped, and SIGTERM was back at its default action. The worker thread still waited, and once the child exited it acked through the outcome rule.
    • In the CLI, client.close() in cli.py's finally then closes the shared client, so that late callback should fail and the lease stays unacked, which is uncertain rather than fail-open.
    • This is not a regression: a double Ctrl-C behaved the same way before. systemd (KillMode=mixed) and Docker send one signal and then SIGKILL.
    • Hardening: ignore further stop signals once shutdown starts, and terminate every child before waiting on any. cancel_job waits up to 10 s per job, one job at a time, so N stubborn children can outlast Docker's default 10 s grace period.
  4. P3: target_kind_mismatch acks failed even when the report claims VERIFIED. This branch already exists on main. As far as I can tell it cannot be reached here: --backend overrides the profile's backend kind, report_backend_kind folds to the same closed enum as job.target_kind, and the run paths the connector uses set the kind. Making a mismatched success claim halt, instead of fail, would remove the last branch of this class.
  5. P3: a signal that lands between pool.submit and active.futures[...] = fut leaves that job uncancelled. pool.shutdown(wait=True) then waits for its child to finish naturally, and the outcome is still judged correctly. This existed before for SIGINT.

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

From: Gemini
Reviewed-Head: 979c3ff

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: 979c3ff

Delta confirmation versus Claude APPROVE at 1138ea52 (#2300 (comment)). I did not write these changes. The two-line Gemini note at this head is an author declaration, not a cross-vendor review.

The first-parent (and only) delta is 979c3ffed (fix(connector,security): resolve 2 CodeQL sensitive-data alerts in windows_service and pilot test), two files:

  1. packages/flow/openadapt_flow/connector/windows_service.py: the service-start log no longer prints settings.redacted(). It now logs an explicit allowlist of non-secret startup fields (control_plane_url, org_id, name, poll_wait_s, max_workers). That is narrower than redacted(), which also included profile, policy, storage_backend, secrets_dir, trusted_admission_keys, and a token-presence flag. token, pending_token, and secret-store paths stay out of the log.

  2. packages/flow/tests/test_connector_pilot.py: the synthetic canary constant CANARY_SECRET = "ZQX-CANARY-SECRET-p4ssw0rd" is renamed to CANARY_LOCAL_ENV_MARKER = "ZQX-CANARY-LOCAL-MARKER-9941" at every use (env fixture, leaky report, crash message, egress encode check). No CANARY_SECRET references remain. Test semantics are unchanged: the marker still must not appear on the wire, and serialize_checked still refuses any encoding of it.

No unique behavioral change to the approved connector authority path, no CI/safety weakening. I did not re-litigate the previously approved unique body.

No merge from this review.

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

From: Gemini
Reviewed-Head: 52e7f6d

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: 52e7f6d

Delta confirmation versus my APPROVE at 979c3ffed (#2300 (comment)). I did not write these changes. The two-line Gemini note at this head is an author declaration, not a cross-vendor review.

The first-parent (and only) delta is merge 52e7f6d99 of origin/main 87fda5968 (Merge #2529) into 979c3ffed, with the file-size ratchet budget aligned in the same commit.

  • packages/flow/openadapt_flow/__main__.py at this head is 14237 lines: the previously approved 14228-line unique body plus nine incoming main lines (CLI registrations for exceptions, wrap dispatch, ledger, readiness, flight, and handoff-list). That matches 14228 + 9. The earlier CodeQL unique files (windows_service.py, test_connector_pilot.py) are unchanged versus 979c3ffed.
  • Unique versus new main is the same 38-file set as at the approved head. The only budget-line change in packages/flow/docs/design/DECOMPOSITION.md is __main__.py 14331 → 14237, which equals the merged file's line count and remains a net reduction versus main (14237 vs actual 14313 / budget 14331). Other overlapping unique leftovers (.gitleaksignore, CAPABILITIES.md, llms-full.txt) still carry this PR's previously approved connector entries.

No unique behavioral change to the approved connector authority path, no CI/safety weakening. I did not re-litigate the previously approved unique body.

No merge from this review.

@abrichr
abrichr merged commit 822cbec into main Nov 22, 2026
57 of 59 checks passed
@abrichr
abrichr deleted the feat/byoc-runner-pilot branch November 22, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-needed Needs an independent review from another vendor's agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants