Skip to content

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

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

fffonion wants to merge 106 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

Local verification at 7473ff9

  • --lib --all-features, default threads: 786 passed / 0 failed / 6 ignored, three consecutive runs
  • agent_loop_tests: 76/0 in 456.90 s; before the fix this test hung until GitHub killed the job at its 6-hour cap
  • service::managed_effects serial: 166/0
  • rss_corpus_compile_tests: 87/87 sources compiled
  • provider_opaque 21/0, provider_stream_codec 11/0, guardian sandbox 28/0 and budget 6/0, telegram 41/0, CLI bin 3/0
  • 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.
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.
@fffonion fffonion closed this Nov 20, 2026
@fffonion fffonion reopened this Nov 20, 2026
@fffonion fffonion changed the title repin core to 2f433eda and migrate the guest corpus to Option/Result repin core to 2f433eda: typed Option/Result corpus, merged with the telegram/guardian line Nov 20, 2026
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