# Jcode 0.99.1 headless ACP model setter

Date: 2026-11-08. Task #809, Refs #1317 AC4. **Passed:** native setter APIs and
the actual owned `JcodePeer`/DB-latch path in a fixture with no TUI client.
This does not qualify a shared native TUI binding or failover concurrency.
The production Jcode capability remains disabled pending that form restriction.
This is compatibility evidence, not a security attestation or account/model run.

## Exact artifact and setup

- macOS arm64 installed Jcode reports 0.99.1, v0.99.1 (7206efd0c).
  Its 142,887,552-byte executable has SHA-256
  `eccb33c08a21764317b0e0bf217e60c745b90f51c7bf6d2ff90b548b9fe7383e`.
  A single byte-identical private executable copy is checked before/after;
  no dependency tree or personal native home is copied.
- Native `jcodeCommand`, owned-group helpers, `JcodePeer`, `ModelOverrides` and
  `ModelOverrideLatches` are the actual first-party implementations. The passing
  adapter/latch source is `7c86077e89f790af0fd444b8ca9bd90e8d0bc09f`.
- Fresh 0700 temporary roots hold HOME, JCODE_HOME, cwd, TMPDIR, all XDG and
  hub/tool homes. Empty native/project MCP files, `JCODE_DISABLE_CLAUDE_MCP=1`,
  `JCODE_NO_TELEMETRY=1`, `--no-update` and `--no-selfdev` avoid account/import/
  updater paths. No configured account, key or actual model is used.
  Telemetry-file absence is not claimed; all native writes remain isolated.
- A native `provider add` creates one no-key OpenAI-compatible fixture profile,
  default model `receipt-model-a`, pointing only to an owned ephemeral loopback
  server. The integration fixture additionally declares `receipt-model-b` in
  that same private profile's models array before startup. Endpoint, auth and
  default A do not change. This matters: without catalog opt-in or explicit B,
  the native default advertises static A only, even though its raw setter can
  accept B. The probe never pretends that an unused GET model list was consumed.

## Native isolation controls

Every native command uses Seatbelt from the existing local-worker profile plus
owned paths. Actual-home data and installed-runtime write-open are denied.
Native TCP is limited to the exact fixture provider port; an owned decoy port
is denied. Only the owned server/debug Unix sockets are allowed. No port 4600,
actual gateway, public provider, real key or native account is used.

The Rust HTTP runtime needs the named
`com.apple.SystemConfiguration.configd` lookup. A separate create/release control
returns a NULL dynamic-store handle without it and a valid handle with it,
without querying or changing configuration values. The final profile adds only
that service; file and network negative controls still pass. No OS/security
setting, file limit or deadline is changed.

The provider rejects Origin, credentials, unknown paths, oversized bodies,
unexpected models and excess completion calls. It emits bounded fixed text SSE,
never tool calls. Client filesystem/terminal capabilities are false. Owned
processes and groups are stopped and observed gone. Detached lifetime
containment is still unproven, not a disposable-runner attestation.

## Native APIs and actual adapter behavior

The raw protocol leg initializes exact `jcode` 0.99.1/protocol 1 and creates a
session. While fixture request A is held, both `session/set_model` and
`session/set_config_option` refuse with the native processing-a-prompt error.
There is still only request A. After normal A completion, legacy set_model B
acknowledges with configOptions and the same-session config update; the next
request uses B. Standard set_config_option A then produces request A. Launch
argv remains A on both serve and ACP, with wire sequence `[A, B, A]`.

The separate integration leg uses the actual `JcodePeer` and its owned serve/ACP
children, with the same profile and fixed launch A. A transparent observer calls
the original request method with unchanged arguments and returns the same
promise; it records only bounded method/model IDs, not replacement responses.

1. Initial native advertisement proves baseline A and advertised B. The runtime
   requires exact 0.99.1 identity/receipt plus existing Jcode compat admission;
   native advertisement alone cannot grant a capability.
2. A real DB override A enters the first deliver. The provider holds A's stream.
   Writing desired B while busy sends no setter or second model request.
3. A completes unchanged. The next deliver sends standard
   `session/set_config_option`, `configId: model`, value B. Native B completes,
   and the actual latch reports B applied. The private provider config hash is
   unchanged immediately after B, not merely after a later restoration.
4. Clear removes the DB intent. The next deliver sets the original baseline A,
   the provider observes A, and latch status is A with no desired/pending value.
5. Three prompts have accepted/completed receipts, two standard model setters
   have exact values `[B, A]`, and the same owned serve/ACP launch is stopped.
   Provider config remains byte-identical after stop. The actual installed
   executable and selected actual config snapshot remain unchanged for the leg.

The fixture native profile, CLI argv and synthetic responses are all declared
before effects. No `jcode_cmd`, `-m`, provider-profile or credential configuration
is made live by the runtime override. Actual hub CLI/dashboard authority is
separate unit/integration evidence, not claimed as a native journey here.

## Shared TUI limitation

The ACP child checks its own `prompt_running`. The shared native server protects
an ordinary stream with an Agent mutex, but deferred model mutation is not a
logical TUI-turn fence. The pinned source's failed-attempt/failover retry path
releases and reacquires that mutex; a queued mutation can run in between.
[SetModel/deferred mutation](https://github.com/1jehuang/jcode/blob/v0.99.1/crates/jcode-app-core/src/server/provider_control.rs#L723),
[streaming lock](https://github.com/1jehuang/jcode/blob/v0.99.1/crates/jcode-app-core/src/server/client_lifecycle.rs#L3925)
and [failover boundary](https://github.com/1jehuang/jcode/blob/v0.99.1/crates/jcode-app-core/src/server/turn_failover.rs#L156)
are source inspection, not a native failover execution receipt.
This fixture has no TUI client and does not qualify that concurrency path.
No TUI-bound live setter is enabled from this receipt without a separately
reviewed form/ownership restriction. No native load-session recovery ceiling
is relaxed; 0.99.1 still does not echo the restored session identity.

## Failed attempts and real-home observations

Two earlier raw attempts failed before serve readiness, with zero provider
requests/setters, confirmed owned stop and unchanged per-leg actual config.
The diagnostic attempt captured Rust system-configuration's NULL-object panic.
The isolated dynamic-store control identified the precise missing named lookup;
the final fresh raw run kept every assertion and bound and passed with it.
Private logs from the failed attempts are retained.

After the successful actual-peer run, the controller was accidentally invoked
again before its earlier completion was checked. Exclusive native-home creation
refused with EEXIST before any new native command. The first immutable structured
result is preserved; the duplicate stdout redirect overwrote that stdout log,
so the passing structured file, not the later log, is the authoritative artifact.
No duplicate native run or config restore was performed.

The selected actual Jcode/Kimi config/credential snapshot is nine entries,
with symlinks recorded without following. The actual-peer leg matched before
and after with digest
`d5e53329f27db1df63c90c6f475049b8df13611d3913ec09b7589a1e6d580997`.
Other probes observed Kimi credential drift between legs, before their native
spawn; writer attribution is unproven. There is no task-wide immutable-state
claim across those intervals, and no real file was restored or edited.

## Evidence and remaining scope

Private workspace scratch `temp/task809-jcode` holds the producers;
`temp/task809` holds the controllers and closed case bindings/results.

| Item | SHA-256 |
| --- | --- |
| raw Mac producer | `22259a94a7e568f9570dbfcee3e8ed85075bb72cd8031c87492f58ba4c0e00b2` |
| actual-peer producer | `c75c04dcc374d1a8ed7cf7223693e975e481a9b104200ed1912ac5fd732ddcca` |
| actual-peer controller | `4a801a8d5471274ef6269144a2d98c1ee7053808cba4d540229bd5ea511d793f` |
| actual-peer structured result | `502bc53ef01e2f38462ab92387dd343788a636dfa38301753635f090930d196a` |

Native TUI/failover, other platforms/providers/versions, real accounts/models
and installed-hub rollout remain unverified. Source checks, canonical DGX and
exact-head hosted CI are separate PR gates. No COMPAT/trust widening, verified
stamp, release or production model change occurs in this task.
