Skip to content

feat(ding): add harness-neutral guarded adapter seam - #123

Closed
myobie wants to merge 2 commits into
mainfrom
agent/harness-neutral-ding-adapter
Closed

feat(ding): add harness-neutral guarded adapter seam#123
myobie wants to merge 2 commits into
mainfrom
agent/harness-neutral-ding-adapter

Conversation

@myobie

@myobie myobie commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • let compact ding select one opt-in external activity adapter through structured argv, with no shell, provider selector, inferred arguments, or redundant delivery enum
  • resolve the complete managed task environment before direct argv expansion for both PTY and exec backends, so generated ST_ROOT and declared adapter roots work without collapsing argument boundaries
  • consume a strict generic activity/incarnation/generation/sequence/freshness + inputBuffer JSONL contract and require an exact PTY activity snapshot before a generation/revision-guarded write
  • persist exact PTY attempt ownership before the packet so restart or ambiguous transport cannot replay possibly-written bytes; only a proven zero-byte conflict clears the attempt
  • add a separate generic ding-control hook-owned ingress for exact filenames already injected by an external lifecycle hook
  • preserve omitted/bare ding lowering and legacy DING bytes exactly; configured rich DING is fail-closed and never falls back

Boundaries

Core contains no provider grammar, hook installation, hook-payload parsing, model-call trigger, or mid-turn interruption mechanism. A successful guarded write is PTY ownership, not a claimed harness acceptance receipt. The rich path is experimental and depends on the PTY activity and guarded-send contracts in compoundingtech/pty#131 and compoundingtech/pty#133.

Addresses #111.

Review correction proof

tests/exec_backend.rs::generated_rich_ding_uses_task_only_roots_without_shell_expansion starts an isolated test subprocess with parent ST_ROOT and ADAPTER_ROOT removed. It discovers and reconciles a compact rich-DING declaration, launches the generated DING task through the real exec backend, proves $ST_ROOT resolves the native catalog inbox, proves the declared $ADAPTER_ROOT starts the exact fake adapter argv, and proves shell-looking argument text remains inert.

Validation

At corrected exact head d7500b0fcad8bb268da9da96c0226d9caddbe305 on exact base c6846f6239329f0803142afc06c15a07b93937c1:

  • cargo test --workspace --all-targets --no-fail-fast -- --test-threads=1
  • cargo test --workspace --doc
  • cargo test --test exec_backend -- --test-threads=1 (8 passed, including the real generated-sidecar proof)
  • cargo test --lib 'ding::' --no-fail-fast (42 passed)
  • cargo test -p agent-spec compact_ding
  • cargo test --test ding_control --test invariants
  • cargo test --test native_only
  • strict Clippy for agent-spec all targets and the changed st2 lib/bin/integration targets
  • exact-file Rustfmt and git diff --check

Hosted Nix is intentionally left to the PR gate because Nix is unavailable on the authoring host. Full workspace strict Clippy remains baseline-red only on the two current-main too_many_arguments / type_complexity lints outside this diff.

@schickling schickling added area:ding DING delivery: inbox notice into a running agent · Set: manual area:driver Harness drivers: launch, MCP, app-server, native delivery · Set: manual harness:neutral Harness-neutral core that must not encode provider specifics · Set: manual type:feature New user-visible or system capability · Set: manual labels Aug 18, 2026
@schickling-assistant

Copy link
Copy Markdown
Contributor

Superseded by provider-native session drivers and merged #390. This branch would reintroduce a second generic managed-harness delivery owner.

Posted on behalf of @schickling
field value
agent_identity dev3.direct.omp.jmg9x29x
session dev3.jmg9x29x
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.0.11
agent_runtime OMP 18.0.11
tooling_profile dotfiles@2161b9c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ding DING delivery: inbox notice into a running agent · Set: manual area:driver Harness drivers: launch, MCP, app-server, native delivery · Set: manual harness:neutral Harness-neutral core that must not encode provider specifics · Set: manual type:feature New user-visible or system capability · Set: manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants