diff --git a/.github/workflows/adk-parallel-replay.yml b/.github/workflows/adk-parallel-replay.yml new file mode 100644 index 00000000..1d6a446e --- /dev/null +++ b/.github/workflows/adk-parallel-replay.yml @@ -0,0 +1,57 @@ +name: ADK completed sibling replay regression +on: + pull_request: + paths: + - 'examples/adk-parallel-replay/**' + - 'sdk/typescript/**' + - '.github/workflows/adk-parallel-replay.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + replay: + runs-on: ${{ matrix.os }} + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + os: [windows-latest, ubuntu-latest] + label: [release-2.11.0, pr-base, pr-fixed] + include: + - label: release-2.11.0 + ref: '' + options: '' + - label: pr-base + ref: c220fca16a7e7f7620bde799c50b240f2451ef79 + options: '--adk-src upstream-adk/src' + - label: pr-fixed + ref: 3e309d5d3eb753343590e28baf5b8efc547645c8 + options: '--adk-src upstream-adk/src --expect-kept' + steps: + - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + if: matrix.ref != '' + with: + repository: google/adk-python + ref: ${{ matrix.ref }} + path: upstream-adk + sparse-checkout: src + - uses: actions/setup-node@v4 + with: + node-version: '24.19.0' + - uses: actions/setup-python@v5 + with: + python-version: '3.12.10' + - run: npm ci --prefix sdk/typescript + - run: npm run build --prefix sdk/typescript + - run: python -m pip install -r examples/adk-parallel-replay/requirements.lock.txt + - run: python -m pip check + - run: python examples/adk-parallel-replay/verify.py ${{ matrix.options }} --label ${{ matrix.label }} --output evidence/${{ matrix.label }}.json + - run: python examples/adk-parallel-replay/check_evidence.py evidence/${{ matrix.label }}.json + - name: Concurrent boundary and malformed effect controls + if: matrix.label == 'release-2.11.0' + run: node examples/adk-parallel-replay/concurrent-boundary.mjs --local evidence/concurrent-boundary.json + - uses: actions/upload-artifact@v4 + with: + name: adk-parallel-${{ matrix.os }}-${{ matrix.label }} + path: evidence/*.json diff --git a/examples/adk-parallel-replay/README.md b/examples/adk-parallel-replay/README.md new file mode 100644 index 00000000..0478f9e5 --- /dev/null +++ b/examples/adk-parallel-replay/README.md @@ -0,0 +1,93 @@ +# ADK completed-sibling replay regression + +This isolated lab reproduces [Google ADK #7428](https://github.com/google/adk-python/issues/7428) and compares the exact base and proposed head of [PR #7429](https://github.com/google/adk-python/pull/7429). A successful ticket tool finishes before its parallel pager sibling raises. On affected ADK, the completed tool's response disappears from session history and the next model request. + +The provider is a disposable loopback HTTP service. Every write commits a new row to its own SQLite journal; it has **no native deduplication**. The verifier counts those rows independently of Once receipts. Runtime uses no real model or remote provider, and needs no credentials. + +## Observed comparison + +| ADK code | Completed result saved | History-based retry: raw / Once effects | Forced retry: raw / Once effects | +| --- | --- | --- | --- | +| Released `google-adk==2.11.0` | no | 2 / 1 | 2 / 1 | +| PR base `c220fca16a7e7f7620bde799c50b240f2451ef79` | no | 2 / 1 | 2 / 1 | +| Proposed fix `3e309d5d3eb753343590e28baf5b8efc547645c8` | yes | 1 / 1 | 2 / 1 | + +The PR base comparison isolates the proposed fix from other changes since the release. The original pager error propagates unchanged in every version. The failed pager gets no invented response. The scripted model repeats the write if history contains no successful result; a separate adversarial mode forces repetition even when the fixed ADK retains it. This does not reproduce the contributor's live-model 10/10 measurement. + +## Protection contract and assertions + +The host captures `host-ticket-intent-001` outside model output. ADK call IDs change between attempts; they are transport metadata, never logical identity. Tenant/tool identity, project and title are all effect-bearing fields. Every protected call starts a fresh Node process using the same durable Once file, so a cached in-memory receipt cannot satisfy replay. + +Seven real ADK runner scenarios assert history, next-model-request contents, exact receipt replay and independent effect counts: raw/protected history-based retry; raw/protected forced retry; changed-title `CONFLICT`; lost-acknowledgement `UNKNOWN`; and crash-after-commit `UNKNOWN`. The crash host reports uncertainty rather than pretending the missing boundary response is success. + +Three additional boundary cases (confirmed, lost acknowledgement, hard crash) each verify title, project and tenant conflicts before dispatch; missing identity rejection; and expected-but-missing ledger rejection. The ambiguous cases remain `UNKNOWN` after unavailable truth or `NOT_FOUND`; neither permits redispatch. An authoritative loopback lookup requires exactly one row matching the original identity **and complete effect**, then confirms and durably replays the receipt. All cases retain exactly one provider effect. + +An event handshake orders tool completion before sibling failure; there is no sleep-based scheduling. The test-only claim lease is 1 ms so an abandoned claim is expired by the fresh-process recovery attempt. It is not a production lease recommendation. The host remembers that an existing ledger is expected and checks its presence before SDK initialization; this fixture is not a general host provisioning implementation. + +## Run + +Requirements: Node 24.19.0 and Python 3.12.10 (CI pins both). Create an isolated Python environment first. From the repository root: + +```sh +python -m venv .venv +# POSIX: source .venv/bin/activate +# PowerShell: .venv\Scripts\Activate.ps1 +npm ci --prefix sdk/typescript +npm run build --prefix sdk/typescript +python -m pip install -r examples/adk-parallel-replay/requirements.lock.txt +python examples/adk-parallel-replay/verify.py --output release.json +python examples/adk-parallel-replay/check_evidence.py release.json +``` + +For the source comparison, clone Google ADK separately and create two detached worktrees: + +```sh +git clone https://github.com/google/adk-python.git upstream-adk +git -C upstream-adk fetch origin pull/7429/head +git -C upstream-adk worktree add ../adk-base c220fca16a7e7f7620bde799c50b240f2451ef79 +git -C upstream-adk worktree add ../adk-fixed 3e309d5d3eb753343590e28baf5b8efc547645c8 +python examples/adk-parallel-replay/verify.py --adk-src adk-base/src --label pr-base --output base.json +python examples/adk-parallel-replay/verify.py --adk-src adk-fixed/src --expect-kept --label pr-fixed --output fixed.json +``` + +Git resolves those worktree paths relative to `upstream-adk`, so both worktrees are created in the repository root. If running Git from another directory, use absolute worktree paths. Do not run Python with `-O`: the verifier refuses execution with assertions disabled. All Python dependencies are version-pinned; this is a version lock, not a hash-verified supply-chain lock. Run `python -m pip check` to check the installed dependency graph. + +Generated JSON has `schema_version: 1` and `status: PASS` only after all assertions pass. It includes the source revision (when supplied), ADK runner/SDK entry/requirements SHA-256 hashes, receipts, independently read provider rows, and each no-dispatch safety probe with before/after row counts. Reconciliation is a read-only operation despite the fixture lookup using HTTP POST. `NOT_FOUND` and unavailable truth responses are injected adapter responses, not a demonstration of real-provider absence. Evidence records machine-observable fixture assertions; it is not an independently authored audit or a tamper-proof provider attestation. + +`check_evidence.py` checks the generated JSON offline. A separate falsification control rejects mismatched effects and non-unique lookup rows, and verifies that a new host intent can create another ticket. That control deliberately bypasses Once once to create a duplicate; its three provider rows are reported separately and are not included in the protected-scenario counts. The fixture has no native idempotency; providers with sufficient native idempotency or constraints should use them. A retry must retain the original intent ID; minting a new one would permit another effect. + +`--sdk-url file:///absolute/path/to/node_modules/@once-agent/sdk/dist/index.js` tests a clean packed or published consumer. The checked evidence records both against released ADK, using SDK 0.1.25. Default execution uses the repository SDK build. The separate workflow repeats the release/base/fix matrix and uploads generated evidence. Its remote result must be checked separately from local results. + +## Validation recorded on 9 October 2026 + +All five local fixture runs passed again from a clean checkout/environment: release, exact PR base, exact PR head, clean packed Once consumer and clean registry consumer. Each runs seven ADK scenarios, three boundary cases and the separate lookup/fresh-intent falsification control (35 ADK scenarios, 15 boundary cases, five falsification controls total). All five JSON files passed the offline checker. `evidence.json` contains their model/session observations, receipts, probe traces and independently counted provider rows. Recorded platform: Windows, Python 3.12.10, Node 24.19.0. Full `npm run test:release --prefix sdk/typescript` exited 0 (200 Node tests plus package/contract/regression scripts); the focused safety subset passed 58/58 and the additional SDK safety regression 2/2. These are local results; inspect CI separately for the current PR commit. + +The focused upstream tests are taken from the proposed head in both comparisons: + +```sh +PYTHONPATH=adk-fixed/src python -m pytest adk-fixed/tests/unittests/test_runners.py adk-fixed/tests/unittests/flows/llm_flows/tools/test_batch_executor.py -k 'tool_error or keep_completed or plain_result' -q +# Repeat with PYTHONPATH=adk-base/src, keeping the same head test files. +``` + +The head passed 16 tests; the base failed 14 and passed the two regression guards (200 deselected). Optional upstream-test dependencies are separate from the fixture lock: `a2a-sdk[http-server]==1.2.2`, `pytest-mock==3.16.0`, `google-api-core==2.28.1`, and `opentelemetry-api==1.42.1`. The full upstream suite was not run. + +Repository checks passed: SDK build; `node --test test/tool-call.test.mjs test/local.test.mjs test/wrap-tool.test.mjs test/wrap-tool-mcp.test.mjs test/first10.test.mjs` from `sdk/typescript` (58 tests); `npm run test:first10-package`; `npm run test:wrap-tool-package` (14 ESM/CJS checks plus TypeScript contracts); `node scripts/generate-first10-proof.mjs --check`; `node scripts/check-site-surface.mjs`; and `node scripts/generate-site-surface.mjs --check` from the root. No proof asset drift required regeneration. Initial restricted-network fixture execution and direct invocation of package scripts did not pass; the recorded passes use loopback access and the required npm entry points. + +## Limits + +### Supplementary same-machine boundary concurrency + +`node examples/adk-parallel-replay/concurrent-boundary.mjs SDK_FILE_URL OUTPUT.json` +starts twelve fresh Node workers against one durable authority and a separate provider +SQLite journal. It asserts one original effect, exact receipt recovery for blocked +workers, five malformed effect shapes rejected before dispatch, changed-effect +conflict and a second effect only for a new intentional host identity. It uses a +30-second lease; the sequential crash lab's 1 ms lease is unsuitable for this +overlap test. Cold SQLite initialization can fail closed with `STATE_UNAVAILABLE`; +the test records that status and requires subsequent same-identity receipt replay. +This qualifies the local boundary only, not ADK runner concurrency or distributed +storage. Windows passes do not qualify this supplementary test on Linux. + +See the [adversarial comparison review](adversarial-review.md) and [experimental branch deployment controls](deployment-controls.md). CI repeats all three ADK variants on Windows and Linux with pinned runtimes, checks the installed dependency graph and verifies the generated JSON before uploading it. A failed rerun removes any old output at its requested path so stale PASS evidence cannot be mistaken for a current result. + +This is deterministic same-machine integration evidence with independently counted **fixture** effects. ADK session history is in memory; Once state and provider effects are durable SQLite. The Once boundary restarts, but this does not qualify whole-framework crash recovery, distributed authority, live mode, confirmation/control-flow results, cancellation races, opaque provider retries, real-model decisions or production providers. It changes no protection kernel or public API. It demonstrates neither universal exactly-once execution nor independent production qualification, adoption or endorsement by Google. diff --git a/examples/adk-parallel-replay/adversarial-review.md b/examples/adk-parallel-replay/adversarial-review.md new file mode 100644 index 00000000..174ec9a6 --- /dev/null +++ b/examples/adk-parallel-replay/adversarial-review.md @@ -0,0 +1,25 @@ +# Comparison review, 9 October 2026 + +## What the comparison establishes + +Raw and protected cases use the same scripted model, tool inputs, logical intent and non-deduplicating loopback provider. Every POST commits a provider journal row. The verifier queries that journal separately from boundary output. Each scenario gets isolated provider and Once files: the shared intent string across scenarios does not represent one global operation. + +The model's history-based policy is an explicit assumption, not evidence of every real model's decision. The proposed ADK fix keeps the successful result and therefore avoids that scripted repeat (raw and protected both have one effect). Forced replay deliberately ignores retained history and shows the separate external-effect boundary (raw two, protected one). Keeping successful tool history and protecting an external effect solve different failure paths. The reported callback workaround in #7428 also retains results but changes exception propagation; it is not tested by this lab. + +## Identity and effects + +The host owns `host-ticket-intent-001` outside model output; ADK call IDs vary. Tenant/tool, project and title are bound. All routes in the protected scenario enter the boundary. Changing title/project/tenant conflicts before another provider row is added. A fresh host intent is allowed to create a second ticket; changing identity is not an acceptable retry. Native provider idempotency is intentionally absent. This does not establish superiority over adequate native idempotency or a database constraint. + +## Restart and uncertainty + +Each protected tool invocation starts a fresh Node process with the same durable SQLite path; exact confirmed receipts replay across processes. Crash after provider commit leaves uncertainty and the next process returns UNKNOWN without POSTing again. Lost acknowledgement is simulated by throwing after receipt parsing; it is not a TCP fault injection. The 1 ms lease only expedites sequential fixture recovery. There are no overlapping claims or distributed authorities. ADK sessions and the Python host's expected-ledger flag stay in memory. The whole framework does not restart. Expected-but-missing state rejection is host logic and does not establish general provisioning, filesystem attack resistance or atomic state admission. + +## Reconciliation and evidence + +The provider lookup accepts exactly one matching operation row with the complete effect. Changed effects and duplicate rows return UNKNOWN in a separate falsification control. That control deliberately performs one bypass write to create the duplicate and reports its three rows separately. Unavailable truth and NOT_FOUND are injected adapter responses; they leave uncertainty blocked. Successful authoritative fixture lookup produces the exact ticket/effect receipt, then another fresh process replays it. Before/after provider counts are checked and recorded for every no-dispatch probe. + +The SDK trusts the host's reconciliation callback. No claim is made that Once itself validates arbitrary provider truth. These are independently counted fixture effects, not independent authorship, production qualification, tamper-proof attestation or evidence of Google endorsement. Source revisions and entry hashes aid reproduction, but the dependency lock pins versions without distribution hashes. The offline checker validates JSON consistency; it cannot prove that supplied JSON came from a genuine run. + +## Unqualified paths + +No live model/provider, whole-runner crash recovery, concurrent/distributed authority, cancellation race, opaque provider retry, live mode or confirmation/control-flow result coverage. The full upstream ADK suite is not run. No universal exactly-once claim. PR #7429 remains an upstream proposal; this lab does not endorse or speak for Google. diff --git a/examples/adk-parallel-replay/boundary.mjs b/examples/adk-parallel-replay/boundary.mjs new file mode 100644 index 00000000..a9ac7f9d --- /dev/null +++ b/examples/adk-parallel-replay/boundary.mjs @@ -0,0 +1,43 @@ +// Disposable test boundary. Every request runs in a new Node process. +import { readFileSync, existsSync } from 'node:fs'; +const request = JSON.parse(readFileSync(0, 'utf8')); +const { protectToolCall } = await import(request.sdkUrl || new URL('../../sdk/typescript/dist/index.js', import.meta.url).href); +try { + // The host remembers whether authority should already exist across restart. + // Do not let SDK initialization recreate expected-but-missing state. + if (request.expectedState && !existsSync(request.statePath)) { + throw Object.assign(Error('Expected ledger missing'), { code: 'STATE_UNAVAILABLE' }); + } + const result = await protectToolCall({ + operationId: request.operationId, + effect: request.effect, + statePath: request.statePath, + leaseMs: request.leaseMs ?? 1, + metadata: request.metadata, + execute: async effect => { + const response = await fetch(request.providerUrl + '/tickets', { + method: 'POST', headers: { 'content-type': 'application/json' }, + body: JSON.stringify({ operationId: request.operationId, effect }), + signal: AbortSignal.timeout(5000), + }); + if (!response.ok) throw Error('Provider response failed'); + const receipt = await response.json(); + if (request.mode === 'crash') process.exit(71); + if (request.mode === 'lost-ack') throw Error('Acknowledgement lost after provider commit'); + return receipt; + }, + reconcile: request.reconcile ? async ({ operationId, effect }) => { + if (request.reconcile === 'NOT_FOUND') return { status: 'NOT_FOUND' }; + if (request.reconcile === 'UNKNOWN') return { status: 'UNKNOWN' }; + const response = await fetch(request.providerUrl + '/lookup', { + method: 'POST', headers: { 'content-type': 'application/json' }, + body: JSON.stringify({ operationId, effect }), signal: AbortSignal.timeout(5000), + }); + if (!response.ok) return { status: 'UNKNOWN' }; + return response.json(); + } : undefined, + }); + console.log(JSON.stringify({ status: 'CONFIRMED', result })); +} catch (error) { + console.log(JSON.stringify({ status: error.code || 'ERROR', message: error.message })); +} diff --git a/examples/adk-parallel-replay/check_evidence.py b/examples/adk-parallel-replay/check_evidence.py new file mode 100644 index 00000000..3c3d02bd --- /dev/null +++ b/examples/adk-parallel-replay/check_evidence.py @@ -0,0 +1,42 @@ +"""Read-only evidence structure and effect-count checker (no dependencies).""" +import json +import sys + +if not __debug__: + raise SystemExit('Assertions are required') +for filename in sys.argv[1:]: + with open(filename, encoding='utf-8') as file: + evidence = json.load(file) + assert evidence['schema_version'] == 1 and evidence['status'] == 'PASS' + assert len(evidence['scenarios']) == 7 and len(evidence['safety']) == 3 + for item in evidence['scenarios']: + repeated = item['forced'] or not evidence['expect_kept'] + count = 1 if item['protected'] else 1 + int(repeated) + assert len(item['provider_effects']) == count + assert len(item['first_responses']) == int(evidence['expect_kept']) + assert all(row['operation'] == 'host-ticket-intent-001' for row in item['provider_effects']) + if item['protected'] and repeated: + assert item['boundary_processes'] == 2 + if item['changed']: + assert item['tool_results'][1]['status'] == 'CONFLICT' + elif item['mode'] != 'confirmed': + assert all(result['status'] == 'UNKNOWN' for result in item['tool_results']) + else: + assert item['tool_results'][0] == item['tool_results'][1] + for item in evidence['safety']: + assert len(item['provider_effects']) == 1 + assert item['missing_state'] == 'STATE_UNAVAILABLE' + assert sum(probe['response']['status'] == 'CONFLICT' for probe in item['probes']) == 3 + for probe in item['probes']: + assert probe['effects_before'] == probe['effects_after'] == 1 + if item['mode'] != 'confirmed': + assert [probe['response']['status'] for probe in item['probes'] if probe['request'].get('reconcile') in ['UNKNOWN', 'NOT_FOUND']] == ['UNKNOWN', 'UNKNOWN'] + recovered = next(probe['response'] for probe in item['probes'] if probe['request'].get('reconcile') == 'provider') + assert recovered['result'] == {'ticket_id': 1, 'effect': item['provider_effects'][0]['effect']} + controls = evidence['lookup_controls'] + assert controls['mismatched_lookup'] == controls['duplicate_lookup'] == {'status': 'UNKNOWN'} + assert len(controls['provider_effects']) == 3 and controls['deliberate_bypass_effects'] == 1 + assert [row['operation'] for row in controls['provider_effects']] == ['host-ticket-intent-001', 'host-ticket-intent-002', 'host-ticket-intent-001'] + print(filename + ': evidence checks PASS') +if len(sys.argv) == 1: + raise SystemExit('Usage: python check_evidence.py evidence.json [more.json ...]') diff --git a/examples/adk-parallel-replay/concurrent-boundary.mjs b/examples/adk-parallel-replay/concurrent-boundary.mjs new file mode 100644 index 00000000..530e7670 --- /dev/null +++ b/examples/adk-parallel-replay/concurrent-boundary.mjs @@ -0,0 +1,81 @@ +// Additional boundary qualification: independent provider SQLite, fresh workers. +// This does not qualify ADK's parallel runner or distributed storage. +import assert from 'node:assert/strict'; +import { DatabaseSync } from 'node:sqlite'; +import { createServer } from 'node:http'; +import { spawn } from 'node:child_process'; +import { mkdtempSync, rmSync, writeFileSync } from 'node:fs'; +import { tmpdir } from 'node:os'; +import { join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +const [sdkArgument, output] = process.argv.slice(2); +const sdkUrl = sdkArgument === '--local' ? new URL('../../sdk/typescript/dist/index.js', import.meta.url).href : sdkArgument; +assert(sdkUrl && output, 'Usage: node concurrent-boundary.mjs SDK_FILE_URL OUTPUT'); +rmSync(output, {force: true}); +const root = mkdtempSync(join(tmpdir(), 'once-adk-concurrent-')); +const journal = new DatabaseSync(join(root, 'provider.sqlite')); +journal.exec('CREATE TABLE effects(id INTEGER PRIMARY KEY, operation TEXT, effect TEXT)'); +const rows = () => journal.prepare('SELECT * FROM effects ORDER BY id').all(); +const server = createServer(async (req, res) => { + let body = ''; for await (const chunk of req) body += chunk; + const request = JSON.parse(body); + const entry = journal.prepare('INSERT INTO effects(operation,effect) VALUES (?,?)') + .run(request.operationId, JSON.stringify(request.effect)); + // Hold acceptance response so duplicate workers overlap an active dispatch. + await new Promise(resolve => setTimeout(resolve, 250)); + res.end(JSON.stringify({ ticket_id: Number(entry.lastInsertRowid), effect: request.effect })); +}); +await new Promise(resolve => server.listen(0, '127.0.0.1', resolve)); +const effect = {tool: 'fixture.tenant-A.create_ticket', args: {project: 'disposable', title: 'disk full'}}; +const request = {sdkUrl, operationId: 'concurrent-intent', effect, leaseMs: 30000, + statePath: join(root, 'once.sqlite'), providerUrl: `http://127.0.0.1:${server.address().port}`}; +const call = change => new Promise((resolve, reject) => { + const child = spawn(process.execPath, [fileURLToPath(new URL('boundary.mjs', import.meta.url))]); + const timer = setTimeout(() => { child.kill(); reject(Error('Boundary timed out')); }, 15000); + let stdout = '', stderr = ''; + child.stdout.on('data', chunk => stdout += chunk); + child.stderr.on('data', chunk => stderr += chunk); + child.on('error', reject); + child.on('exit', code => { + clearTimeout(timer); + try { assert.equal(code, 0, stderr); resolve(JSON.parse(stdout)); } catch (error) { reject(error); } + }); + child.stdin.end(JSON.stringify({...request, ...change})); +}); +try { + const concurrent = await Promise.all(Array.from({length: 12}, () => call({}))); + assert.equal(rows().length, 1); + assert(concurrent.some(result => result.status === 'CONFIRMED')); + // SQLite first-open contention may fail closed as STATE_UNAVAILABLE. + assert(concurrent.every(result => ['CONFIRMED', 'UNKNOWN', 'IN_FLIGHT', 'STATE_UNAVAILABLE'].includes(result.status)), JSON.stringify(concurrent)); + const replay = await call({expectedState: true}); + assert.equal(replay.status, 'CONFIRMED'); + assert.equal(rows().length, 1); + const recovered = []; + for (const result of concurrent.filter(result => result.status !== 'CONFIRMED')) { + const retry = await call({expectedState: true}); + assert.deepEqual(retry, replay); + assert.equal(rows().length, 1); + recovered.push({initial: result.status, retry}); + } + const invalid = []; + for (const badEffect of [null, {}, {tool: '', args: {}}, {tool: 'x', args: []}, {...effect, url: 'unreviewed'}]) { + const result = await call({effect: badEffect}); + assert.equal(result.status, 'INVALID_EFFECT'); + assert.equal(rows().length, 1); + invalid.push(result); + } + const conflict = await call({effect: {...effect, args: {...effect.args, title: 'changed'}}}); + assert.equal(conflict.status, 'CONFLICT'); + assert.equal(rows().length, 1); + const freshIntent = await call({operationId: 'intentional-second'}); + assert.equal(freshIntent.status, 'CONFIRMED'); + assert.equal(rows().length, 2); + writeFileSync(output, JSON.stringify({status: 'PASS', scope: 'same-machine boundary; not ADK runner concurrency', + workers: 12, concurrent, replay, recovered, invalid, conflict, freshIntent, provider_effects: rows()}, null, 2)); + console.log('PASS: 12 concurrent workers, one original effect; five invalid shapes blocked; distinct intent adds one effect.'); +} finally { + await new Promise(resolve => server.close(resolve)); + journal.close(); + rmSync(root, {recursive: true, force: true}); +} diff --git a/examples/adk-parallel-replay/deployment-controls.md b/examples/adk-parallel-replay/deployment-controls.md new file mode 100644 index 00000000..e754e2f9 --- /dev/null +++ b/examples/adk-parallel-replay/deployment-controls.md @@ -0,0 +1,17 @@ +# Experimental branch deployment controls + +Cloudflare Pages `onceexec` uses its GitHub source integration independently of GitHub Actions. A draft PR or path-limited test workflow does not disable that integration. The previous push created preview `bdabe667-5109-470c-a264-ddff190eec6a`; it was deleted before this preparation run. + +On 9 October 2026 the project was inspected using existing host-managed Wrangler authentication, then its source controls were updated and read back: + +- `preview_deployment_setting`: `all` -> `custom` +- `preview_branch_includes`: `["*"]` (preserved) +- `preview_branch_excludes`: `[]` -> `["test/*", "experiment/*", "experimental/*"]` +- `production_branch`: `main` (preserved) +- `production_deployments_enabled`: `false` (already false; preserved) +- `deployments_enabled`: `true` (preserved) +- Build command, destination `docs`, path controls and PR comments: preserved. + +The production canonical deployment remained `b99dd0f0-065d-4f6c-81df-f02f4f717e4e`. This suppresses automatic Git previews for these prefixes; it does not deploy, alter the existing production workflow, block explicit deployment commands, or cover arbitrary branch names. Experimental work should use one of these prefixes. Inspect the account controls before pushing under a new naming convention. A repository file cannot enforce account-level settings. + +Cloudflare documents these controls in its [Pages project update API](https://developers.cloudflare.com/api/resources/pages/subresources/projects/methods/edit/). Excludes require `custom`. Preserve production flags and build configuration when adjusting previews; do not disable the Git integration wholesale or enable production automation as part of a preview fix. diff --git a/examples/adk-parallel-replay/evidence.json b/examples/adk-parallel-replay/evidence.json new file mode 100644 index 00000000..425c0529 --- /dev/null +++ b/examples/adk-parallel-replay/evidence.json @@ -0,0 +1,4867 @@ +{ + "date": "2026-10-09", + "validation_parent_commit": "88614fc440fb5e4e006bbd590628d29b9af8dc84", + "pr_base": "c220fca16a7e7f7620bde799c50b240f2451ef79", + "pr_head": "3e309d5d3eb753343590e28baf5b8efc547645c8", + "runs": [ + { + "schema_version": 1, + "status": "PASS", + "label": "google-adk-2.11.0", + "adk_file": "C:\\Users\\jamie\\Documents\\Codex\\2026-10-09\\complete-the-remaining-engineering-and-independent\\work\\clean-env\\Lib\\site-packages\\google\\adk\\__init__.py", + "adk_source_revision": null, + "adk_runners_sha256": "97f530e72575ad6ef259c4de6f20004a18d384913509a4b7bf1435b7e406e7b2", + "sdk_entry_sha256": "cbabedf624cecc55bd8b307f10156f329fe70d60cb803e7f56bb0fb782d303df", + "requirements_sha256": "8a5354fc27ad1723eb035411c4eb7b3947c3fd1016e6a5de6ded96614c8218d6", + "installed_adk_version": "2.11.0", + "python": "3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]", + "node": "v24.19.0", + "sdk": "repository build", + "expect_kept": false, + "scenarios": [ + { + "protected": false, + "forced": false, + "mode": "confirmed", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "ticket_id": 1, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + }, + { + "status": "CONFIRMED", + "result": { + "ticket_id": 2, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 2, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 0 + }, + { + "protected": true, + "forced": false, + "mode": "confirmed", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": false, + "forced": true, + "mode": "confirmed", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "ticket_id": 1, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + }, + { + "status": "CONFIRMED", + "result": { + "ticket_id": 2, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 2, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 0 + }, + { + "protected": true, + "forced": true, + "mode": "confirmed", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": true, + "forced": true, + "mode": "confirmed", + "changed": true, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": true, + "forced": true, + "mode": "lost-ack", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "UNKNOWN", + "message": "ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 threw after dispatch; its external outcome may be unknown. It may already have succeeded. Future unsafe redispatch is blocked. Next action: reconcile authoritative provider truth before retrying with the same identity and durable state." + }, + { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": true, + "forced": true, + "mode": "crash", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "UNKNOWN" + }, + { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + } + ], + "safety": [ + { + "mode": "confirmed", + "first": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "retry": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "conflicts": 3, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 7, + "missing_state": "STATE_UNAVAILABLE", + "probes": [ + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "changed" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "other", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-B.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "operationId": "" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "IDENTITY_REQUIRED", + "message": "protectToolCall requires an explicit stable operationId; no tool was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "STATE_UNAVAILABLE", + "message": "Expected ledger missing" + }, + "effects_before": 1, + "effects_after": 1 + } + ] + }, + { + "mode": "lost-ack", + "first": { + "status": "UNKNOWN", + "message": "ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 threw after dispatch; its external outcome may be unknown. It may already have succeeded. Future unsafe redispatch is blocked. Next action: reconcile authoritative provider truth before retrying with the same identity and durable state." + }, + "retry": { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + }, + "conflicts": 3, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 11, + "missing_state": "STATE_UNAVAILABLE", + "probes": [ + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "changed" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "other", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-B.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "UNKNOWN" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "NOT_FOUND" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "provider" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "operationId": "" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "IDENTITY_REQUIRED", + "message": "protectToolCall requires an explicit stable operationId; no tool was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "STATE_UNAVAILABLE", + "message": "Expected ledger missing" + }, + "effects_before": 1, + "effects_after": 1 + } + ] + }, + { + "mode": "crash", + "first": { + "status": "CRASHED" + }, + "retry": { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + }, + "conflicts": 3, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 11, + "missing_state": "STATE_UNAVAILABLE", + "probes": [ + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "changed" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "other", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-B.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "UNKNOWN" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "NOT_FOUND" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "provider" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "operationId": "" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "IDENTITY_REQUIRED", + "message": "protectToolCall requires an explicit stable operationId; no tool was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "STATE_UNAVAILABLE", + "message": "Expected ledger missing" + }, + "effects_before": 1, + "effects_after": 1 + } + ] + } + ], + "lookup_controls": { + "mismatched_lookup": { + "status": "UNKNOWN" + }, + "duplicate_lookup": { + "status": "UNKNOWN" + }, + "fresh_intent": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 2 + } + }, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 2, + "operation": "host-ticket-intent-002", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 3, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "deliberate_bypass_effects": 1 + } + }, + { + "schema_version": 1, + "status": "PASS", + "label": "pr-base", + "adk_file": "C:\\Users\\jamie\\Documents\\Codex\\2026-10-09\\complete-the-remaining-engineering-and-independent\\work\\once\\adk-base\\src\\google\\adk\\__init__.py", + "adk_source_revision": "c220fca16a7e7f7620bde799c50b240f2451ef79", + "adk_runners_sha256": "e914b54a153dd66eb70c1aeb24f63eb1c6abb5314712262a9159a958039ec8c4", + "sdk_entry_sha256": "cbabedf624cecc55bd8b307f10156f329fe70d60cb803e7f56bb0fb782d303df", + "requirements_sha256": "8a5354fc27ad1723eb035411c4eb7b3947c3fd1016e6a5de6ded96614c8218d6", + "installed_adk_version": "2.11.0", + "python": "3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]", + "node": "v24.19.0", + "sdk": "repository build", + "expect_kept": false, + "scenarios": [ + { + "protected": false, + "forced": false, + "mode": "confirmed", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "ticket_id": 1, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + }, + { + "status": "CONFIRMED", + "result": { + "ticket_id": 2, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 2, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 0 + }, + { + "protected": true, + "forced": false, + "mode": "confirmed", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": false, + "forced": true, + "mode": "confirmed", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "ticket_id": 1, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + }, + { + "status": "CONFIRMED", + "result": { + "ticket_id": 2, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 2, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 0 + }, + { + "protected": true, + "forced": true, + "mode": "confirmed", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": true, + "forced": true, + "mode": "confirmed", + "changed": true, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": true, + "forced": true, + "mode": "lost-ack", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "UNKNOWN", + "message": "ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 threw after dispatch; its external outcome may be unknown. It may already have succeeded. Future unsafe redispatch is blocked. Next action: reconcile authoritative provider truth before retrying with the same identity and durable state." + }, + { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": true, + "forced": true, + "mode": "crash", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "UNKNOWN" + }, + { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + } + ], + "safety": [ + { + "mode": "confirmed", + "first": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "retry": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "conflicts": 3, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 7, + "missing_state": "STATE_UNAVAILABLE", + "probes": [ + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "changed" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "other", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-B.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "operationId": "" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "IDENTITY_REQUIRED", + "message": "protectToolCall requires an explicit stable operationId; no tool was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "STATE_UNAVAILABLE", + "message": "Expected ledger missing" + }, + "effects_before": 1, + "effects_after": 1 + } + ] + }, + { + "mode": "lost-ack", + "first": { + "status": "UNKNOWN", + "message": "ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 threw after dispatch; its external outcome may be unknown. It may already have succeeded. Future unsafe redispatch is blocked. Next action: reconcile authoritative provider truth before retrying with the same identity and durable state." + }, + "retry": { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + }, + "conflicts": 3, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 11, + "missing_state": "STATE_UNAVAILABLE", + "probes": [ + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "changed" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "other", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-B.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "UNKNOWN" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "NOT_FOUND" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "provider" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "operationId": "" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "IDENTITY_REQUIRED", + "message": "protectToolCall requires an explicit stable operationId; no tool was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "STATE_UNAVAILABLE", + "message": "Expected ledger missing" + }, + "effects_before": 1, + "effects_after": 1 + } + ] + }, + { + "mode": "crash", + "first": { + "status": "CRASHED" + }, + "retry": { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + }, + "conflicts": 3, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 11, + "missing_state": "STATE_UNAVAILABLE", + "probes": [ + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "changed" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "other", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-B.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "UNKNOWN" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "NOT_FOUND" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "provider" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "operationId": "" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "IDENTITY_REQUIRED", + "message": "protectToolCall requires an explicit stable operationId; no tool was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "STATE_UNAVAILABLE", + "message": "Expected ledger missing" + }, + "effects_before": 1, + "effects_after": 1 + } + ] + } + ], + "lookup_controls": { + "mismatched_lookup": { + "status": "UNKNOWN" + }, + "duplicate_lookup": { + "status": "UNKNOWN" + }, + "fresh_intent": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 2 + } + }, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 2, + "operation": "host-ticket-intent-002", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 3, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "deliberate_bypass_effects": 1 + } + }, + { + "schema_version": 1, + "status": "PASS", + "label": "pr-fixed", + "adk_file": "C:\\Users\\jamie\\Documents\\Codex\\2026-10-09\\complete-the-remaining-engineering-and-independent\\work\\once\\adk-fixed\\src\\google\\adk\\__init__.py", + "adk_source_revision": "3e309d5d3eb753343590e28baf5b8efc547645c8", + "adk_runners_sha256": "e914b54a153dd66eb70c1aeb24f63eb1c6abb5314712262a9159a958039ec8c4", + "sdk_entry_sha256": "cbabedf624cecc55bd8b307f10156f329fe70d60cb803e7f56bb0fb782d303df", + "requirements_sha256": "8a5354fc27ad1723eb035411c4eb7b3947c3fd1016e6a5de6ded96614c8218d6", + "installed_adk_version": "2.11.0", + "python": "3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]", + "node": "v24.19.0", + "sdk": "repository build", + "expect_kept": true, + "scenarios": [ + { + "protected": false, + "forced": false, + "mode": "confirmed", + "changed": false, + "first_responses": [ + { + "will_continue": null, + "scheduling": null, + "parts": null, + "id": "attempt-1-0", + "name": "create_ticket", + "response": { + "status": "CONFIRMED", + "result": { + "ticket_id": 1, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + } + } + ], + "next_request_responses": [ + { + "will_continue": null, + "scheduling": null, + "parts": null, + "id": "attempt-1-0", + "name": "create_ticket", + "response": { + "status": "CONFIRMED", + "result": { + "ticket_id": 1, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + } + } + ], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "ticket_id": 1, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 0 + }, + { + "protected": true, + "forced": false, + "mode": "confirmed", + "changed": false, + "first_responses": [ + { + "will_continue": null, + "scheduling": null, + "parts": null, + "id": "attempt-1-0", + "name": "create_ticket", + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + } + } + ], + "next_request_responses": [ + { + "will_continue": null, + "scheduling": null, + "parts": null, + "id": "attempt-1-0", + "name": "create_ticket", + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + } + } + ], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 1 + }, + { + "protected": false, + "forced": true, + "mode": "confirmed", + "changed": false, + "first_responses": [ + { + "will_continue": null, + "scheduling": null, + "parts": null, + "id": "attempt-1-0", + "name": "create_ticket", + "response": { + "status": "CONFIRMED", + "result": { + "ticket_id": 1, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + } + } + ], + "next_request_responses": [ + { + "will_continue": null, + "scheduling": null, + "parts": null, + "id": "attempt-1-0", + "name": "create_ticket", + "response": { + "status": "CONFIRMED", + "result": { + "ticket_id": 1, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + } + } + ], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "ticket_id": 1, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + }, + { + "status": "CONFIRMED", + "result": { + "ticket_id": 2, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 2, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 0 + }, + { + "protected": true, + "forced": true, + "mode": "confirmed", + "changed": false, + "first_responses": [ + { + "will_continue": null, + "scheduling": null, + "parts": null, + "id": "attempt-1-0", + "name": "create_ticket", + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + } + } + ], + "next_request_responses": [ + { + "will_continue": null, + "scheduling": null, + "parts": null, + "id": "attempt-1-0", + "name": "create_ticket", + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + } + } + ], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": true, + "forced": true, + "mode": "confirmed", + "changed": true, + "first_responses": [ + { + "will_continue": null, + "scheduling": null, + "parts": null, + "id": "attempt-1-0", + "name": "create_ticket", + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + } + } + ], + "next_request_responses": [ + { + "will_continue": null, + "scheduling": null, + "parts": null, + "id": "attempt-1-0", + "name": "create_ticket", + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + } + } + ], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": true, + "forced": true, + "mode": "lost-ack", + "changed": false, + "first_responses": [ + { + "will_continue": null, + "scheduling": null, + "parts": null, + "id": "attempt-1-0", + "name": "create_ticket", + "response": { + "status": "UNKNOWN", + "message": "ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 threw after dispatch; its external outcome may be unknown. It may already have succeeded. Future unsafe redispatch is blocked. Next action: reconcile authoritative provider truth before retrying with the same identity and durable state." + } + } + ], + "next_request_responses": [ + { + "will_continue": null, + "scheduling": null, + "parts": null, + "id": "attempt-1-0", + "name": "create_ticket", + "response": { + "status": "UNKNOWN", + "message": "ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 threw after dispatch; its external outcome may be unknown. It may already have succeeded. Future unsafe redispatch is blocked. Next action: reconcile authoritative provider truth before retrying with the same identity and durable state." + } + } + ], + "tool_results": [ + { + "status": "UNKNOWN", + "message": "ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 threw after dispatch; its external outcome may be unknown. It may already have succeeded. Future unsafe redispatch is blocked. Next action: reconcile authoritative provider truth before retrying with the same identity and durable state." + }, + { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": true, + "forced": true, + "mode": "crash", + "changed": false, + "first_responses": [ + { + "will_continue": null, + "scheduling": null, + "parts": null, + "id": "attempt-1-0", + "name": "create_ticket", + "response": { + "status": "UNKNOWN" + } + } + ], + "next_request_responses": [ + { + "will_continue": null, + "scheduling": null, + "parts": null, + "id": "attempt-1-0", + "name": "create_ticket", + "response": { + "status": "UNKNOWN" + } + } + ], + "tool_results": [ + { + "status": "UNKNOWN" + }, + { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + } + ], + "safety": [ + { + "mode": "confirmed", + "first": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "retry": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "conflicts": 3, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 7, + "missing_state": "STATE_UNAVAILABLE", + "probes": [ + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "changed" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "other", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-B.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "operationId": "" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "IDENTITY_REQUIRED", + "message": "protectToolCall requires an explicit stable operationId; no tool was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "STATE_UNAVAILABLE", + "message": "Expected ledger missing" + }, + "effects_before": 1, + "effects_after": 1 + } + ] + }, + { + "mode": "lost-ack", + "first": { + "status": "UNKNOWN", + "message": "ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 threw after dispatch; its external outcome may be unknown. It may already have succeeded. Future unsafe redispatch is blocked. Next action: reconcile authoritative provider truth before retrying with the same identity and durable state." + }, + "retry": { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + }, + "conflicts": 3, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 11, + "missing_state": "STATE_UNAVAILABLE", + "probes": [ + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "changed" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "other", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-B.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "UNKNOWN" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "NOT_FOUND" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "provider" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "operationId": "" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "IDENTITY_REQUIRED", + "message": "protectToolCall requires an explicit stable operationId; no tool was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "STATE_UNAVAILABLE", + "message": "Expected ledger missing" + }, + "effects_before": 1, + "effects_after": 1 + } + ] + }, + { + "mode": "crash", + "first": { + "status": "CRASHED" + }, + "retry": { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + }, + "conflicts": 3, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 11, + "missing_state": "STATE_UNAVAILABLE", + "probes": [ + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "changed" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "other", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-B.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "UNKNOWN" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "NOT_FOUND" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "provider" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "operationId": "" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "IDENTITY_REQUIRED", + "message": "protectToolCall requires an explicit stable operationId; no tool was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "STATE_UNAVAILABLE", + "message": "Expected ledger missing" + }, + "effects_before": 1, + "effects_after": 1 + } + ] + } + ], + "lookup_controls": { + "mismatched_lookup": { + "status": "UNKNOWN" + }, + "duplicate_lookup": { + "status": "UNKNOWN" + }, + "fresh_intent": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 2 + } + }, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 2, + "operation": "host-ticket-intent-002", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 3, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "deliberate_bypass_effects": 1 + } + }, + { + "schema_version": 1, + "status": "PASS", + "label": "clean-packed", + "adk_file": "C:\\Users\\jamie\\Documents\\Codex\\2026-10-09\\complete-the-remaining-engineering-and-independent\\work\\clean-env\\Lib\\site-packages\\google\\adk\\__init__.py", + "adk_source_revision": null, + "adk_runners_sha256": "97f530e72575ad6ef259c4de6f20004a18d384913509a4b7bf1435b7e406e7b2", + "sdk_entry_sha256": "cbabedf624cecc55bd8b307f10156f329fe70d60cb803e7f56bb0fb782d303df", + "requirements_sha256": "8a5354fc27ad1723eb035411c4eb7b3947c3fd1016e6a5de6ded96614c8218d6", + "installed_adk_version": "2.11.0", + "python": "3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]", + "node": "v24.19.0", + "sdk": "file:///C:/Users/jamie/Documents/Codex/2026-10-09/complete-the-remaining-engineering-and-independent/work/packed-consumer/node_modules/@once-agent/sdk/dist/index.js", + "expect_kept": false, + "scenarios": [ + { + "protected": false, + "forced": false, + "mode": "confirmed", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "ticket_id": 1, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + }, + { + "status": "CONFIRMED", + "result": { + "ticket_id": 2, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 2, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 0 + }, + { + "protected": true, + "forced": false, + "mode": "confirmed", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": false, + "forced": true, + "mode": "confirmed", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "ticket_id": 1, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + }, + { + "status": "CONFIRMED", + "result": { + "ticket_id": 2, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 2, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 0 + }, + { + "protected": true, + "forced": true, + "mode": "confirmed", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": true, + "forced": true, + "mode": "confirmed", + "changed": true, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": true, + "forced": true, + "mode": "lost-ack", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "UNKNOWN", + "message": "ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 threw after dispatch; its external outcome may be unknown. It may already have succeeded. Future unsafe redispatch is blocked. Next action: reconcile authoritative provider truth before retrying with the same identity and durable state." + }, + { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": true, + "forced": true, + "mode": "crash", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "UNKNOWN" + }, + { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + } + ], + "safety": [ + { + "mode": "confirmed", + "first": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "retry": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "conflicts": 3, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 7, + "missing_state": "STATE_UNAVAILABLE", + "probes": [ + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "changed" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "other", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-B.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "operationId": "" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "IDENTITY_REQUIRED", + "message": "protectToolCall requires an explicit stable operationId; no tool was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "STATE_UNAVAILABLE", + "message": "Expected ledger missing" + }, + "effects_before": 1, + "effects_after": 1 + } + ] + }, + { + "mode": "lost-ack", + "first": { + "status": "UNKNOWN", + "message": "ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 threw after dispatch; its external outcome may be unknown. It may already have succeeded. Future unsafe redispatch is blocked. Next action: reconcile authoritative provider truth before retrying with the same identity and durable state." + }, + "retry": { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + }, + "conflicts": 3, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 11, + "missing_state": "STATE_UNAVAILABLE", + "probes": [ + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "changed" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "other", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-B.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "UNKNOWN" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "NOT_FOUND" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "provider" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "operationId": "" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "IDENTITY_REQUIRED", + "message": "protectToolCall requires an explicit stable operationId; no tool was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "STATE_UNAVAILABLE", + "message": "Expected ledger missing" + }, + "effects_before": 1, + "effects_after": 1 + } + ] + }, + { + "mode": "crash", + "first": { + "status": "CRASHED" + }, + "retry": { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + }, + "conflicts": 3, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 11, + "missing_state": "STATE_UNAVAILABLE", + "probes": [ + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "changed" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "other", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-B.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "UNKNOWN" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "NOT_FOUND" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "provider" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "operationId": "" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "IDENTITY_REQUIRED", + "message": "protectToolCall requires an explicit stable operationId; no tool was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "STATE_UNAVAILABLE", + "message": "Expected ledger missing" + }, + "effects_before": 1, + "effects_after": 1 + } + ] + } + ], + "lookup_controls": { + "mismatched_lookup": { + "status": "UNKNOWN" + }, + "duplicate_lookup": { + "status": "UNKNOWN" + }, + "fresh_intent": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 2 + } + }, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 2, + "operation": "host-ticket-intent-002", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 3, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "deliberate_bypass_effects": 1 + } + }, + { + "schema_version": 1, + "status": "PASS", + "label": "clean-published", + "adk_file": "C:\\Users\\jamie\\Documents\\Codex\\2026-10-09\\complete-the-remaining-engineering-and-independent\\work\\clean-env\\Lib\\site-packages\\google\\adk\\__init__.py", + "adk_source_revision": null, + "adk_runners_sha256": "97f530e72575ad6ef259c4de6f20004a18d384913509a4b7bf1435b7e406e7b2", + "sdk_entry_sha256": "cbabedf624cecc55bd8b307f10156f329fe70d60cb803e7f56bb0fb782d303df", + "requirements_sha256": "8a5354fc27ad1723eb035411c4eb7b3947c3fd1016e6a5de6ded96614c8218d6", + "installed_adk_version": "2.11.0", + "python": "3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]", + "node": "v24.19.0", + "sdk": "file:///C:/Users/jamie/Documents/Codex/2026-10-09/complete-the-remaining-engineering-and-independent/work/published-consumer/node_modules/@once-agent/sdk/dist/index.js", + "expect_kept": false, + "scenarios": [ + { + "protected": false, + "forced": false, + "mode": "confirmed", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "ticket_id": 1, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + }, + { + "status": "CONFIRMED", + "result": { + "ticket_id": 2, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 2, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 0 + }, + { + "protected": true, + "forced": false, + "mode": "confirmed", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": false, + "forced": true, + "mode": "confirmed", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "ticket_id": 1, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + }, + { + "status": "CONFIRMED", + "result": { + "ticket_id": 2, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + } + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 2, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 0 + }, + { + "protected": true, + "forced": true, + "mode": "confirmed", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": true, + "forced": true, + "mode": "confirmed", + "changed": true, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": true, + "forced": true, + "mode": "lost-ack", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "UNKNOWN", + "message": "ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 threw after dispatch; its external outcome may be unknown. It may already have succeeded. Future unsafe redispatch is blocked. Next action: reconcile authoritative provider truth before retrying with the same identity and durable state." + }, + { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + }, + { + "protected": true, + "forced": true, + "mode": "crash", + "changed": false, + "first_responses": [], + "next_request_responses": [], + "tool_results": [ + { + "status": "UNKNOWN" + }, + { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + } + ], + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 2 + } + ], + "safety": [ + { + "mode": "confirmed", + "first": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "retry": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "conflicts": 3, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 7, + "missing_state": "STATE_UNAVAILABLE", + "probes": [ + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "changed" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "other", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-B.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "operationId": "" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "IDENTITY_REQUIRED", + "message": "protectToolCall requires an explicit stable operationId; no tool was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "STATE_UNAVAILABLE", + "message": "Expected ledger missing" + }, + "effects_before": 1, + "effects_after": 1 + } + ] + }, + { + "mode": "lost-ack", + "first": { + "status": "UNKNOWN", + "message": "ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 threw after dispatch; its external outcome may be unknown. It may already have succeeded. Future unsafe redispatch is blocked. Next action: reconcile authoritative provider truth before retrying with the same identity and durable state." + }, + "retry": { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + }, + "conflicts": 3, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 11, + "missing_state": "STATE_UNAVAILABLE", + "probes": [ + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "changed" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "other", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-B.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "UNKNOWN" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "NOT_FOUND" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "provider" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "operationId": "" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "IDENTITY_REQUIRED", + "message": "protectToolCall requires an explicit stable operationId; no tool was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "STATE_UNAVAILABLE", + "message": "Expected ledger missing" + }, + "effects_before": 1, + "effects_after": 1 + } + ] + }, + { + "mode": "crash", + "first": { + "status": "CRASHED" + }, + "retry": { + "status": "UNKNOWN", + "message": "RETRY BLOCKED \u00e2\u20ac\u201d ORIGINAL OUTCOME UNKNOWN. Operation host-ticket-intent-001 may already have succeeded. Repeating it could create another external effect; no second write was dispatched. Next action: supply an authoritative read-only reconcile callback or investigate provider truth; retain the same identity and durable state." + }, + "conflicts": 3, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "boundary_processes": 11, + "missing_state": "STATE_UNAVAILABLE", + "probes": [ + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "changed" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "other", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-B.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFLICT", + "message": "Logical action host-ticket-intent-001 has a different effect-bearing payload. Choose a new id only for a genuinely new action; no write was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "UNKNOWN" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "NOT_FOUND" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "UNKNOWN", + "message": "Provider truth for host-ticket-intent-001 did not confirm an effect. Local mode will not redispatch after an ambiguous attempt; investigate or use a provider idempotency integration." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "reconcile": "provider" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 1 + } + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": { + "operationId": "" + }, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "IDENTITY_REQUIRED", + "message": "protectToolCall requires an explicit stable operationId; no tool was dispatched." + }, + "effects_before": 1, + "effects_after": 1 + }, + { + "request": {}, + "effect": { + "tool": "fixture.tenant-A.create_ticket", + "args": { + "project": "disposable", + "title": "disk full" + } + }, + "response": { + "status": "STATE_UNAVAILABLE", + "message": "Expected ledger missing" + }, + "effects_before": 1, + "effects_after": 1 + } + ] + } + ], + "lookup_controls": { + "mismatched_lookup": { + "status": "UNKNOWN" + }, + "duplicate_lookup": { + "status": "UNKNOWN" + }, + "fresh_intent": { + "status": "CONFIRMED", + "result": { + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + }, + "ticket_id": 2 + } + }, + "provider_effects": [ + { + "ticket_id": 1, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 2, + "operation": "host-ticket-intent-002", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + }, + { + "ticket_id": 3, + "operation": "host-ticket-intent-001", + "effect": { + "args": { + "project": "disposable", + "title": "disk full" + }, + "tool": "fixture.tenant-A.create_ticket" + } + } + ], + "deliberate_bypass_effects": 1 + } + } + ] +} diff --git a/examples/adk-parallel-replay/requirements.lock.txt b/examples/adk-parallel-replay/requirements.lock.txt new file mode 100644 index 00000000..bd55730f --- /dev/null +++ b/examples/adk-parallel-replay/requirements.lock.txt @@ -0,0 +1,54 @@ +aiosqlite==0.22.1 +annotated-doc==0.0.5 +annotated-types==0.8.0 +anyio==4.15.1 +attrs==26.1.0 +Authlib==1.8.0 +certifi==2026.7.22 +cffi==2.1.1 +charset-normalizer==3.5.2 +click==8.5.0 +colorama==0.4.6 +cryptography==50.0.2 +distro==1.9.0 +fastapi==0.141.1 +google-adk==2.11.0 +google-auth==2.61.0 +google-genai==2.29.0 +graphviz==0.21 +h11==0.16.0 +httpcore==1.0.9 +httpx==0.28.1 +idna==3.20 +iniconfig==2.3.1 +joserfc==1.7.5 +jsonschema==4.26.0 +jsonschema-specifications==2025.9.1 +opentelemetry-api==1.42.1 +opentelemetry-sdk==1.42.1 +opentelemetry-semantic-conventions==0.63b1 +packaging==26.3 +pluggy==1.6.0 +pyasn1==0.6.4 +pyasn1_modules==0.4.2 +pycparser==3.1 +pydantic==2.14.0 +pydantic_core==2.50.0 +Pygments==2.21.0 +pytest==9.1.1 +pytest-asyncio==1.4.0 +python-dotenv==1.2.4 +python-multipart==0.0.32 +PyYAML==6.0.3 +referencing==0.37.0 +requests==2.34.2 +rpds-py==2026.9.1 +sniffio==1.3.1 +starlette==1.7.0 +tenacity==9.1.4 +typing-inspection==0.4.4 +typing_extensions==4.16.0 +urllib3==2.8.0 +uvicorn==0.54.0 +watchdog==6.0.0 +websockets==15.0.1 diff --git a/examples/adk-parallel-replay/verify.py b/examples/adk-parallel-replay/verify.py new file mode 100644 index 00000000..fac8f829 --- /dev/null +++ b/examples/adk-parallel-replay/verify.py @@ -0,0 +1,362 @@ +"""Deterministic ADK #7428 regression, loopback effects only; no model credentials.""" +import argparse +import asyncio +import importlib.metadata +import json +import logging +import hashlib +from contextlib import closing +from pathlib import Path +import sqlite3 +import subprocess +import sys +import tempfile +import threading +from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer +from urllib.request import Request, urlopen, url2pathname +from urllib.parse import urlparse + +parser = argparse.ArgumentParser() +parser.add_argument('--adk-src', type=Path, help='Optional pinned upstream src directory') +parser.add_argument('--expect-kept', action='store_true') +parser.add_argument('--label', default='google-adk-2.11.0') +parser.add_argument('--output', type=Path, required=True) +parser.add_argument('--sdk-url', help='Optional packed/published SDK file URL') +args = parser.parse_args() +if not __debug__: + raise SystemExit('Assertions are required; do not use python -O') +# A failed rerun must not leave an old PASS artifact at the requested path. +args.output.unlink(missing_ok=True) +if args.adk_src: + if not (args.adk_src / 'google/adk/runners.py').is_file(): + raise SystemExit('ADK source directory not found: ' + str(args.adk_src)) + sys.path.insert(0, str(args.adk_src.resolve())) + +import google.adk +from google.adk.agents import LlmAgent +from google.adk.models.base_llm import BaseLlm +from google.adk.models.llm_response import LlmResponse +from google.adk.runners import InMemoryRunner +from google.genai import types +from pydantic import PrivateAttr + +logging.disable(logging.CRITICAL) # Expected sibling errors are asserted below. + +HERE = Path(__file__).resolve().parent +OPERATION = 'host-ticket-intent-001' +EFFECT = {'tool': 'fixture.tenant-A.create_ticket', 'args': {'project': 'disposable', 'title': 'disk full'}} + + +class Provider: + """Independent provider journal: commits every POST, with no deduplication.""" + def __init__(self, root): + self.path = root / 'provider.sqlite' + with closing(sqlite3.connect(self.path)) as db, db: + db.execute('CREATE TABLE effects (id INTEGER PRIMARY KEY, operation TEXT, effect TEXT)') + owner = self + + class Handler(BaseHTTPRequestHandler): + def log_message(self, *_): + pass + + def do_POST(self): + payload = json.loads(self.rfile.read(int(self.headers['Content-Length']))) + with closing(sqlite3.connect(owner.path)) as db, db: + if self.path == '/tickets': + row = db.execute('INSERT INTO effects(operation,effect) VALUES (?,?)', + (payload['operationId'], json.dumps(payload['effect'], sort_keys=True))) + ticket_id = row.lastrowid + db.commit() # External effect is durable before responding. + result = {'ticket_id': ticket_id, 'effect': payload['effect']} + elif self.path == '/lookup': + rows = db.execute('SELECT id,effect FROM effects WHERE operation=?', + (payload['operationId'],)).fetchall() + result = {'status': 'UNKNOWN'} + if len(rows) == 1 and json.loads(rows[0][1]) == payload['effect']: + result = {'status': 'CONFIRMED', 'result': { + 'ticket_id': rows[0][0], 'effect': json.loads(rows[0][1])}} + else: + self.send_error(404) + return + body = json.dumps(result).encode() + self.send_response(200) + self.send_header('Content-Type', 'application/json') + self.send_header('Content-Length', str(len(body))) + self.end_headers() + self.wfile.write(body) + + self.server = ThreadingHTTPServer(('127.0.0.1', 0), Handler) + self.thread = threading.Thread(target=self.server.serve_forever, daemon=True) + self.thread.start() + self.url = f'http://127.0.0.1:{self.server.server_port}' + + def rows(self): + # The verifier reads provider truth separately from the Once response. + with closing(sqlite3.connect(self.path)) as db: + return [{'ticket_id': row[0], 'operation': row[1], 'effect': json.loads(row[2])} + for row in db.execute('SELECT id,operation,effect FROM effects ORDER BY id')] + + def close(self): + self.server.shutdown() + self.server.server_close() + self.thread.join() + + +class Boundary: + def __init__(self, root, provider): + self.state = root / 'once.sqlite' + self.provider = provider + self.expected = False + self.pids = [] + + def call(self, effect=EFFECT, **changes): + request = dict(operationId=OPERATION, effect=effect, statePath=str(self.state), + providerUrl=self.provider.url, expectedState=self.expected, + metadata={'transport_attempt': len(self.pids) + 1}) + if args.sdk_url: + request['sdkUrl'] = args.sdk_url + request.update(changes) + child = subprocess.Popen(['node', str(HERE / 'boundary.mjs')], stdin=subprocess.PIPE, + stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + self.pids.append(child.pid) + try: + stdout, stderr = child.communicate(json.dumps(request), timeout=15) + except subprocess.TimeoutExpired: + child.kill() + child.communicate() + raise + self.expected = self.expected or self.state.exists() + if request.get('mode') == 'crash': + assert child.returncode == 71, (stdout, stderr) + return {'status': 'CRASHED'} + assert child.returncode == 0, (stdout, stderr) + return json.loads(stdout) + + +class ScriptedModel(BaseLlm): + """First parallel call; next turn repeats only when history lacks success.""" + force: bool = False + replay_title: str = 'disk full' + _calls: int = PrivateAttr(default=0) + _requests: list = PrivateAttr(default_factory=list) + + async def generate_content_async(self, llm_request, stream=False): + self._calls += 1 + responses = [p.function_response for c in llm_request.contents for p in c.parts or [] + if p.function_response] + self._requests.append([r.model_dump(mode='json') for r in responses]) + success = any(r.name == 'create_ticket' and r.response.get('status') == 'CONFIRMED' + for r in responses) + call = types.Part.from_function_call + if self._calls == 1: + parts = [call(name='create_ticket', args={'title': 'disk full'}), + call(name='notify_oncall', args={'message': 'disk full'})] + elif self._calls == 2 and (self.force or not success): + parts = [call(name='create_ticket', args={'title': self.replay_title})] + else: + parts = [types.Part(text='finished')] + # Attempt identity deliberately differs from host logical identity. + for i, part in enumerate(parts): + if part.function_call: + part.function_call.id = f'attempt-{self._calls}-{i}' + yield LlmResponse(content=types.Content(role='model', parts=parts)) + + +async def run_adk(root, protected, force=False, mode='confirmed', changed=False): + provider = Provider(root) + boundary = Boundary(root, provider) + tool_finished = asyncio.Event() + tool_results = [] + model = ScriptedModel(model='scripted', force=force, + replay_title='changed' if changed else 'disk full') + + async def create_ticket(title: str) -> dict: + effect = {'tool': EFFECT['tool'], 'args': {**EFFECT['args'], 'title': title}} + if protected: + result = await asyncio.to_thread(boundary.call, effect, + mode=mode if not tool_results else 'confirmed') + if result['status'] == 'CRASHED': + result = {'status': 'UNKNOWN'} # Host cannot know crash outcome. + else: + def raw(): + request = Request(provider.url + '/tickets', data=json.dumps({ + 'operationId': OPERATION, 'effect': effect}).encode(), + headers={'Content-Type': 'application/json'}) + with urlopen(request, timeout=5) as response: + return {'status': 'CONFIRMED', 'result': json.load(response)} + result = await asyncio.to_thread(raw) + tool_results.append(result) + tool_finished.set() + return result + + async def notify_oncall(message: str) -> dict: + # Event handshake, no sleep-based ordering. The create task completes + # before this waiter is resumed by the event loop. + await asyncio.wait_for(tool_finished.wait(), timeout=10) + raise RuntimeError('pager service returned 500') + + agent = LlmAgent(name='ops', model=model, tools=[create_ticket, notify_oncall]) + runner = InMemoryRunner(agent=agent, app_name='repro') + session = await runner.session_service.create_session(app_name='repro', user_id='u') + async def turn(text): + async for _ in runner.run_async(user_id='u', session_id=session.id, + new_message=types.Content(role='user', parts=[types.Part(text=text)])): + pass + try: + try: + await turn('Open a ticket and page on-call.') + raise AssertionError('Expected original sibling error') + except RuntimeError as error: + assert str(error) == 'pager service returned 500', str(error) + session = await runner.session_service.get_session(app_name='repro', user_id='u', session_id=session.id) + first_responses = [r.model_dump(mode='json') for e in session.events for r in e.get_function_responses()] + assert len(provider.rows()) == 1 + assert len(first_responses) == int(args.expect_kept), first_responses + if first_responses: + assert first_responses[0]['name'] == 'create_ticket' + await turn('Please finish the task.') + repeated = force or not args.expect_kept + expected_effects = 1 if protected else 1 + int(repeated) + assert len(provider.rows()) == expected_effects, provider.rows() + assert len(tool_results) == 1 + int(repeated) + if repeated and protected: + if changed: + assert tool_results[1]['status'] == 'CONFLICT', tool_results + elif mode != 'confirmed': + assert all(r['status'] == 'UNKNOWN' for r in tool_results), tool_results + else: + assert tool_results[0] == tool_results[1] + assert len(set(boundary.pids)) == 2 + # Verify what ADK actually put in the next model request. + next_has_success = any(r['name'] == 'create_ticket' for r in model._requests[1]) + assert next_has_success == args.expect_kept, model._requests + return dict(protected=protected, forced=force, mode=mode, changed=changed, + first_responses=first_responses, + next_request_responses=model._requests[1], tool_results=tool_results, + provider_effects=provider.rows(), boundary_processes=len(boundary.pids)) + finally: + await runner.close() + provider.close() + + +def safety_cases(root): + evidence = [] + for mode in ['confirmed', 'lost-ack', 'crash']: + case = root / mode + case.mkdir() + provider = Provider(case) + boundary = Boundary(case, provider) + probes = [] + def probe(effect=EFFECT, **changes): + before = len(provider.rows()) + result = boundary.call(effect, **changes) + after = len(provider.rows()) + assert after == before, (changes, result, before, after) + probes.append(dict(request=changes, effect=effect, response=result, + effects_before=before, effects_after=after)) + return result + try: + first = boundary.call(mode=mode) + assert first['status'] == {'confirmed': 'CONFIRMED', 'lost-ack': 'UNKNOWN', 'crash': 'CRASHED'}[mode] + retry = boundary.call() + assert retry['status'] == ('CONFIRMED' if mode == 'confirmed' else 'UNKNOWN'), retry + if mode == 'confirmed': + assert first == retry + for effect in [ + {'tool': EFFECT['tool'], 'args': {**EFFECT['args'], 'title': 'changed'}}, + {'tool': EFFECT['tool'], 'args': {**EFFECT['args'], 'project': 'other'}}, + {'tool': 'fixture.tenant-B.create_ticket', 'args': EFFECT['args']}, + ]: + assert probe(effect)['status'] == 'CONFLICT' + if mode != 'confirmed': + for truth in ['UNKNOWN', 'NOT_FOUND']: + assert probe(reconcile=truth)['status'] == 'UNKNOWN' + recovered = probe(reconcile='provider') + assert recovered['status'] == 'CONFIRMED' + assert recovered['result'] == {'ticket_id': 1, 'effect': EFFECT} + assert probe() == recovered + assert len(provider.rows()) == 1 + assert probe(operationId='')['status'] == 'IDENTITY_REQUIRED' + before = len(provider.rows()) + # A missing expected authority must never silently become a new DB. + boundary.state.rename(case / 'saved.sqlite') + assert probe()['status'] == 'STATE_UNAVAILABLE' + assert not boundary.state.exists() + assert len(provider.rows()) == before + evidence.append(dict(mode=mode, first=first, retry=retry, + conflicts=3, provider_effects=provider.rows(), + boundary_processes=len(boundary.pids), missing_state='STATE_UNAVAILABLE')) + evidence[-1]['probes'] = probes + finally: + provider.close() + return evidence + + +def lookup_controls(root): + """Falsification controls for complete-effect matching and fresh intents.""" + root.mkdir() + provider = Provider(root) + boundary = Boundary(root, provider) + def lookup(effect): + request = Request(provider.url + '/lookup', data=json.dumps({ + 'operationId': OPERATION, 'effect': effect}).encode(), + headers={'Content-Type': 'application/json'}) + with urlopen(request, timeout=5) as response: + return json.load(response) + try: + first = boundary.call() + assert first['status'] == 'CONFIRMED' + mismatched = lookup({'tool': EFFECT['tool'], 'args': {**EFFECT['args'], 'title': 'other'}}) + assert mismatched == {'status': 'UNKNOWN'} + fresh = boundary.call(operationId='host-ticket-intent-002') + assert fresh['status'] == 'CONFIRMED' and fresh['result']['ticket_id'] == 2 + # Deliberate out-of-bound write to challenge the lookup's uniqueness gate. + request = Request(provider.url + '/tickets', data=json.dumps({ + 'operationId': OPERATION, 'effect': EFFECT}).encode(), + headers={'Content-Type': 'application/json'}) + with urlopen(request, timeout=5) as response: + json.load(response) + duplicate = lookup(EFFECT) + assert duplicate == {'status': 'UNKNOWN'} + assert len(provider.rows()) == 3 + return dict(mismatched_lookup=mismatched, duplicate_lookup=duplicate, + fresh_intent=fresh, provider_effects=provider.rows(), + deliberate_bypass_effects=1) + finally: + provider.close() + + +async def main(): + with tempfile.TemporaryDirectory(prefix='once-adk-') as directory: + root = Path(directory) + scenarios = [] + for protected, force, mode, changed in [ + (False, False, 'confirmed', False), (True, False, 'confirmed', False), + (False, True, 'confirmed', False), (True, True, 'confirmed', False), + (True, True, 'confirmed', True), (True, True, 'lost-ack', False), + (True, True, 'crash', False), + ]: + case = root / f'adk-{protected}-{force}-{mode}-{changed}' + case.mkdir() + scenarios.append(await asyncio.wait_for( + run_adk(case, protected, force, mode, changed), timeout=40)) + sdk_path = Path(url2pathname(urlparse(args.sdk_url).path)) if args.sdk_url else HERE.parent.parent / 'sdk/typescript/dist/index.js' + source_revision = subprocess.check_output(['git', '-C', str(args.adk_src), 'rev-parse', 'HEAD'], text=True).strip() if args.adk_src else None + evidence = dict(schema_version=1, status='PASS', label=args.label, adk_file=google.adk.__file__, + adk_source_revision=source_revision, + adk_runners_sha256=hashlib.sha256(Path(google.adk.__file__).with_name('runners.py').read_bytes()).hexdigest(), + sdk_entry_sha256=hashlib.sha256(sdk_path.read_bytes()).hexdigest(), + requirements_sha256=hashlib.sha256((HERE / 'requirements.lock.txt').read_bytes()).hexdigest(), + installed_adk_version=importlib.metadata.version('google-adk'), + python=sys.version, node=subprocess.check_output(['node', '--version'], text=True).strip(), + sdk=args.sdk_url or 'repository build', expect_kept=args.expect_kept, + scenarios=scenarios, safety=safety_cases(root), + lookup_controls=lookup_controls(root / 'lookup-controls')) + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(json.dumps(evidence, indent=2) + '\n', encoding='utf-8') + print(json.dumps({'label': args.label, 'status': 'PASS', 'adk_scenarios': len(scenarios), + 'safety_cases': len(evidence['safety']), 'output': str(args.output)})) + + +if __name__ == '__main__': + asyncio.run(main())