Skip to content

repin core to 2f433eda and migrate the guest corpus to Option/Result - #12

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

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

Conversation

@fffonion

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/decode, resource-backed host schemas).

Local verification at 552fbc1:

  • rss_corpus_compile_tests: 87/87 sources compiled, 1 test passed (293.53s)
  • config_auth_rss_tests: 15 passed
  • lib --all-features (default threads): 750 passed / 0 failed / 6 ignored
  • service::managed_effects serial: 166 passed / 0 failed
  • effects::broker:: serial: 51 passed / 0 failed
  • cargo fmt --all -- --check and cargo clippy --locked --all-features --all-targets -- -D warnings both exit 0

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.
…h reuse

A nested resource-bearing map is refused before provider dispatch; a live resource cannot be expressed across the serialized JSON-text boundary, so the old opaque_nonserializable VM error is unreachable. Unwrap the native transport Option carrier and prove the resource-free text control still dispatches.
The restore pin guard in rss/storage/admission.rss now binds sql_text(restore_json.copy()) beside input.tool_graph_id; replace the obsolete restore_harness_json census key without changing native budget weights.
approval_attest now takes the attestation as serialized JSON text, so the
authority fixture encodes its payload with agent::json_text and hands the
resulting text to the host instead of an object literal.
The process and run clocks are incidental safety nets around explicit durable receipt and one-publication assertions. Parallel native workers can consume the former 4/8-second windows before wait(P1) or wait(P2); extend only this fixture clocks while keeping every live-sibling, writer-gate and single-CAS assertion.
Both requested and elapsed classifications depend on one admitted original clock. Give parallel storage and preparation thirty seconds to reach the guard, then request or await the same clock; no classification or shared-clock assertion changes.
Checkpoint replay and committed restore assert durable once-only receipts, not a three-second source run. Child deadline denial explicitly sleeps on the same admitted original clock at the child-read latch; extend its fixture budget so parallel package setup cannot expire first. Preserve all frozen-root, identity, and no-Native-read assertions.
Keep the four-second source deadline and the production five-second management deadline. Precompile fixture code before admission, widen explicit latch safety bounds, and permit a typed busy checkpoint when the management clock expires while the second output is held. A premature success still fails, a busy refusal is retried after release, and both durable output references and the independent workspace commit remain required.
Parallel disk and worker scheduling can miss three-second arrival probes or close the source before the actual Native boundary. Widen incidental fixture and latch bounds while keeping actual closed/cancelled observation, no stale witness, and no late publication assertions. The two drain cases still finish by their original absolute source deadline plus five seconds, well before the later ninety/120-second management clock; production clocks are unchanged.
…lock

The busy refusal path accepted by 2902ef6 had no timing or receipt check, so a
checkpoint that bailed out of the held batch immediately would have passed a
test named for waiting. The refusal must now arrive only after the five-second
management clock has run out, and it must publish no receipt.
A two-second run clock was consumed by the fixture's compile/sign/install
phase under parallel load, leaving the deadline closer than the reserve and
collapsing the delayed-entry proof. T now leaves room for the ladder and the
admission asserts that budget instead of assuming it.
Drops needless borrows and clones in the auth host tests, uses the slice
iterator the standard module list actually needs, replaces map_or with
is_none_or, and removes blank lines that separated outer attributes from
their items. No behaviour changes.
Merges feat/telegram-typing-edit (ceb8400) so the repin branch carries the
production behaviours that shipped on that line: Guardian-first review
handoff, sandbox-bounded auto-approval, non-expiring API keys with
metadata-only expiry CAS, bounded provider request bodies, provider
transport failure categories, Telegram approval rendering, and the prompt
tool preference.

Conflicted RSS sources and src/auth/host/stream.rs were resolved by keeping
the repin's typed dialect as the form and carrying over the typing line's
behaviour: sandbox classification and review handoff in guardian.rss,
automatic-review scopes in agent/main.rss, transport phase and category
propagation in provider_runtime/refresh/token_save, typed SQLite values with
created-count reporting in storage/approvals.rss, and start/read transport
failure handling in auth/host/stream.rs.

Known red after the merge (fixes follow in separate commits): eight opaque
provider integration tests, two provider stream codec tests, several
fallible host unit tests, the guardian sandbox deadline fixtures, and the
CLI signal driver's inline guest sources that still use the retired
`string?` syntax.
master advanced to 452b627, whose tree is byte-identical to ceb8400
(`git diff ceb8400 452b627` is empty) — the telegram/guardian work was
re-landed there under different commit ids. Merging master keeps the
branch's ancestry current so the pull request compares cleanly; every
conflict resolved to this branch's side, which already carries both the
typed-dialect migration and that line's behaviour.
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