Skip to content

An absent allow-egress draws no boundary - #6

Draft
jithinAB wants to merge 1 commit into
masterfrom
pact-kernel/q17-absent-egress-unrestricted
Draft

jithinAB wants to merge 1 commit into
masterfrom
pact-kernel/q17-absent-egress-unrestricted

Conversation

@jithinAB

Copy link
Copy Markdown
Contributor

What changes

A workspace that writes no allow-egress: now draws no boundary: every part of it may talk outside. allow-egress: [] still means nothing may leave, and every written list is held exactly as before.

Why

PACT read an absent line two ways. nothing_reaches_outside_the_box and looking_up_by_meaning_needs_an_embedder (crates/pact-cli/src/main.rs) already treated it as "this author has not decided"; the model-binding check (loader/leaves-the-box in egress.rs), the Python adapter's egress.admits / missing_for (which resolve filters model candidates with) and a carried program's network treated it as air-gapped. A tree with no line pinning a hosted model was refused, and the message quoted allow-egress: [], a line its author never wrote.

The BMH owner's decision (BMH PACT integration plan, decision Q17) is permissive defaults, constrained by declaration: an agent that writes no boundary may use any model, hosted or local, and an author who wants the air-gapped desk of D17 writes allow-egress: []. This PR makes the specification and both reference ports say that, so a runtime that follows it reports no divergence.

Changes

  • crates/pact-cli/src/egress.rs: refusals returns for a workspace with no allow-egress:; doc comment states the rule.
  • adapters/python/src/pact_adapters/egress.py: admits answers yes when the line is absent.
  • adapters/python/src/pact_adapters/ir.py, harness.py: a carried program may reach outside when the line is absent; the run report says "names programs or is not written".
  • spec/schema.yaml: the field's help and comment state both readings.
  • CHANGELOG.md: entry.
  • Tests: new crates/pact-cli/tests/a_workspace_that_writes_no_boundary_binds_any_model.rs (absent binds a hosted model; [] refuses the same tree; [llm] admits it; fails on master for the absent case); a Python test for the absent case; the sealed-room fixture in test_a_stage_that_runs_what_the_model_wrote.py now writes allow-egress: [], since a sealed room is now a declaration.

Evidence

  • cargo test --locked (whole workspace): all green.
  • New checker test: 3/3 with the change; the absent case fails on master.
  • Python: every test file that touches egress, admits, missing_for or program reach (48 files) with --all-extras: 1134 passed, 29 skipped, 1 failed — test_the_second_port_reports_a_spend_cap_it_cannot_price, which fails identically on master in this environment (the TypeScript adapter's node modules are not installed).

Opened as a draft for review by the PACT maintainers.

🤖 Generated with Claude Code

A workspace that writes no `allow-egress:` was read two ways: the tool
egress and meaning-search checks treated it as "this author has not
decided", while the model-binding check (`loader/leaves-the-box`), the
Python adapter's `egress.admits` (and so `missing_for`, which `resolve`
filters candidates with) and a carried program's network treated it as
air-gapped, refusing hosted models in trees that never opted in and
quoting an `allow-egress: []` the author never wrote.

Read it one way: absent draws no boundary, so every part may talk
outside; `allow-egress: []` still means nothing may leave, and every
written list is held exactly as before. The air-gapped desk of D17 is a
declaration, `allow-egress: []`.

- egress.rs: `refusals` returns for a workspace with no line.
- egress.py: `admits` answers yes when the line is absent.
- ir.py: a carried program may reach outside when the line is absent;
  the run report says "names `programs` or is not written".
- spec/schema.yaml: the field's help and comment state both readings.
- Tests: a new checker test (absent binds a hosted model; `[]` refuses
  it; `[llm]` admits it), a Python test for the absent case, and the
  sealed-room fixture now writes `allow-egress: []`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant