Skip to content

repin core to 2f433eda: typed Option/Result corpus, merged with the telegram/guardian line - #12

Open
fffonion wants to merge 171 commits into
masterfrom
subagent/option-result-agent-20261115-66f677ce
Open

fffonion wants to merge 171 commits into
masterfrom
subagent/option-result-agent-20261115-66f677ce

Conversation

@fffonion

@fffonion fffonion commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Repins pd-vm / pd-host-function / pd-host-schema to core master 2f433edab3f1907e8cb060e901357d7e2af016ce and migrates every bundled RSS source plus the test fixtures to the strict typed dialect (Unit / Option / Result, typed json::encode::<T>, resource-backed host schemas). The deployed telegram/guardian line is merged in, so this branch carries the production behaviours too.

What changed

  • core pin fc8b0c81 → 2f433eda; guest now uses bare Some / None
  • 87 bundled sources and the fixtures moved to the typed dialect; no dynamic or legacy-null host schemas remain
  • config::load_snapshot / config::check_policy publish a resource-backed result schema, with policy_handle still a live host handle
  • rss/storage/admission.rss budgets its probe row at 1 MiB so restore envelopes are not truncated to zero rows
  • merged feat/telegram-typing-edit (ceb8400) and then master's byte-identical re-landing (452b627), keeping typed form plus the Guardian/approval/provider/API-key behaviour
  • fixed a real hang in the merged code: synchronous SQLite history seeding exhausted the caller's Tokio cooperative budget, so the VM kept polling a pending host future without yielding
  • two product defects found by the typed test sweep: the lowered typed JSON encoder bypassed the restricted binding, and an OAuth inactive-owner path left the non-submitted native flow live

Integration suite consolidated: 136 → 63 roots

The suite had 136 tests/*.rs roots, 1835 #[test], 189,583 lines and a 62 G target tree, almost all of it duplicated linking. The roots are now 15 domain wrappers plus 86 leaf cases under tests/cases/, and the 22 cases the deletion ledger closed (harness/toolchain scaffolding, a superseded aggregate corpus diagnostic, the dependency_pin_tests provenance guard, ignored transcript placeholders) are gone. Every stage was verified with a mechanical name inventory (zero missing, zero added, zero ignore-status changes) and per-target runs; no assertion was weakened.

Verification at 601b0dd

All 63 integration roots, by name, with --all-features unless noted:

  • auth_cli_contract_tests 136/0, auth_rss_transport_tests 78/0, oauth_bridge_tests 124/0, native_auth_contract_tests 54/0, codex_device_contract_tests 34/0
  • provider_codec_tests 94/0, provider_config_fixture_tests 66/0 (config-fixture lane), provider_loop_tests 39/0 (config-fixture lane)
  • agent_rss_contract_tests 60/0, effect_contract_tests 29/0, plugin_contract_tests 61/0, rss_tools_contract_tests 114/0, gateway_contract_tests 111/0, docs_contract_tests 32/0
  • earlier at 7473ff9: --lib --all-features 786/0/6 three consecutive runs, agent_loop_tests 76/0, service::managed_effects serial 166/0, corpus 87/87

Timing-sensitive fixtures were made load-tolerant by separating the fixture's observation window from the authority clock; no deadline, refusal, or assertion was relaxed.

Seal automatic review for unconfigured Telegram ingress and persist
an exact one-call human handoff only for valid uncertain decisions.
Keep explicit denials, critical risk and authority failures closed.

Cover ownership, restart, cancellation, storage faults and concurrent
resolution. Coordinate duplicate cold compilation through the LRU.
Qualify critical denial and its business final under one shared
original-fixture observation deadline; production deadlines unchanged.
Recognize zero expiry only for canonical stored API-key credentials.
Keep OAuth expiry, bounded one-shot handles and request ownership intact.
Provide a trusted Native generation-checked metadata update that preserves
secret slots and unrelated records, with default-feature SDK proof.

Focused auth-store suite: 42 passed. Strict Clippy and native header
regressions passed. Historical local durable target remains 75 passed /
2 waiting-timeout failures; its focused pair passed separately.
This publication acquires new-head CI; it does not claim local full green.
Move `rustscript-vm` (pd-vm) and `pd-host-function` to fc8b0c81 so the agent
tracks the strict Unit/Option/Result host contracts.

Rust-level adaptation only; the guest corpus migration is a separate scope:

- `HostAsyncBridge`: the pinned trait drops `cancel_op` and requires
  `cleanup_op(op_id, HostAsyncOpTerminal)`. Both the production bridge and the
  recording test bridge now drop the operation future there, which is the
  behaviour the removed `cancel_op` hook used to provide through the old
  default `cleanup_op`.
- `HostTypeSchema` gained `Unit`, `Option` and `Result`; the OAuth schema
  completeness helper recurses into them instead of failing exhaustively.
- Refresh the dependency pin guard, the documented core revision and
  `Cargo.lock` (the sqlite feature now resolves rusqlite 0.40 through
  tokio-rusqlite).

Gates that pass: `cargo fmt --all -- --check`,
`cargo check --locked --all-features --all-targets` (0 errors, 0 warnings),
`cargo clippy --locked --all-features --all-targets -- -D warnings`,
`tests/dependency_pin_tests.rs` and `tests/docs_consistency_tests.rs`.

Still blocked, tracked separately: the bundled RSS corpus does not compile
against the new dialect (78 of 86 sources rejected for `null` literals, `T?`,
`: null`), 73 of 115 agent catalog functions return schemas the new boundary
rejects (`Unknown`, `Null`, nested `Optional`), and the pinned core now makes
the disabled native JIT backend fatal for VM invocations, so pd-vm needs the
`cranelift-jit` feature (or a core-side interpreter fallback).
…dialect

Repins pd-vm to master 2f433eda (bare Some/None) and migrates the bundled corpus: null to (), nullable annotations to Option, typed JSON targets, hoisted sqlite parameter arrays, and host-contract carriers for control_check, parse_json_object and provider_call.
…n carriers

Converts twelve high-fan-in host returns to Named shapes with logical Option fields, keeps resources as live handles, and drops the matching quarantine entries. Corpus compiles 42 of 87.
…previews

Converts the twelve transport hosts to Named shells with live resource handles and text bodies, proves rollback with real handles, and adds a closed preview_arguments slot so write and execute approvals keep a typed preview under text-only tool arguments.
Migrates the last fifteen guest modules off null literals, publishes the remaining Optional host fields as logical carriers, and aligns the bundle import scan with the compiler dialect so bundled sources using match and Some are accepted.
The runner validated the entry result against the legacy null-or-string encoding while the guest now returns tagged carriers, so every command entry failed with OutputInvalid. Accept both encodings and normalise the two optional fields back to the legacy wire shape for existing callers.
Guest payload intents spell an unused device or code selector as an empty string. Treating it as a present selector made every authorization-code exchange fail before it reached the network, so token requests stayed at zero.
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