Skip to content

test(agents): add disabled GPT-6 Astra fixture backend - #1809

Draft
groupthinking with Copilot wants to merge 5 commits into
mainfrom
copilot/test-agents-evaluate-gpt-6-astra
Draft

test(agents): add disabled GPT-6 Astra fixture backend#1809
groupthinking with Copilot wants to merge 5 commits into
mainfrom
copilot/test-agents-evaluate-gpt-6-astra

Conversation

Copilot AI commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Canonical issue

Linked by PR automation.

Outcome

Adds a disabled-by-default GPT-6 Astra fixture backend for Agent Factory evaluation, focused on async tool-call semantics rather than live provider execution. The new path records pending call_id state, enforces provenance-bound authorization and cross-run isolation, and emits a machine-readable comparison artifact alongside the existing native and Antigravity paths.

  • Fixture backend contract

    • Adds /home/runner/work/EventRelay/EventRelay/src/youtube_extension/services/agents/astra_backend.py
    • Models Astra response handling, async function calls, token/output caps, cost estimation, and terminal blocked/cancelled states
    • Keeps live execution gated off by default
  • Authorization and isolation

    • Requires immutable control records to authorize async tool calls or steering updates
    • Partitions pending-call state by origin, task_id, and run_id
    • Rejects plain-text GO, peer/shared-state messages, mismatched call_ids, and cross-run callback reuse
  • Pending-call durability

    • Persists pending tool-call metadata in a fixture store before result application
    • Makes result submission idempotent
    • Revokes late results after safety stop / terminal state
  • Steering and receipts

    • Maps mid-turn steering to append-only instruction-update events
    • Preserves original request and completed receipt lineage
    • Records provider configuration_update events in execution receipts
  • Coverage

    • Adds /home/runner/work/EventRelay/EventRelay/tests/unit/test_astra_backend.py
    • Covers slow-tool continuation, restart semantics, duplicate/mismatched results, token/media fail-closed behavior, authorization injection attempts, and safety-stop handling
control = AstraControlRecord(
    issuer="eventrelay-control-plane",
    scope="origin:video-pack",
    run_id="run-1",
    task_id="task-1",
    allowed_action="tool_call",
    expires_at="2099-01-01T00:00:00+00:00",
    nonce="nonce-1",
    receipt_locator="receipt://control/tool-call",
)

receipt = await AstraBackend(config, transport, store=store).execute(
    "Review evidence",
    {"stable_run_id": "run-1"},
    origin="video-pack",
    task_id="task-1",
    control_record=control,
)

Scope

  • Included:
    • Optional disabled Astra fixture adapter
    • Provenance-bound authorization checks
    • Origin/task/run pending-call partitioning
    • Idempotent tool-result application
    • Append-only steering updates and comparison artifact
    • Focused unit coverage for the new backend and adjacent regression surface
  • Explicitly excluded:
    • Live Astra API calls
    • Deployment, billing, or spend changes
    • Broader Agent Factory runtime refactors
    • Production benchmark execution

Risk

  • Risk level: medium
  • Failure mode:
    • Fixture contract diverges from the intended provider behavior
    • Overly strict authorization or callback validation blocks future adapter wiring
  • Rollback:
    • Revert /home/runner/work/EventRelay/EventRelay/src/youtube_extension/services/agents/astra_backend.py
    • Revert /home/runner/work/EventRelay/EventRelay/tests/unit/test_astra_backend.py

Verification

List exact automated and manual checks, tied to the current head SHA.

  • Focused tests — python -m pytest tests/unit/test_astra_backend.py tests/unit/test_antigravity_backend.py --no-cov -q on 23ac4cb0cd4ee551d44afdfa2b80eab2b907190d
  • Required CI — awaiting repository-required GitHub Actions on 23ac4cb0cd4ee551d44afdfa2b80eab2b907190d
  • Review threads resolved — no open review threads on 23ac4cb0cd4ee551d44afdfa2b80eab2b907190d

Production evidence

Not applicable. This change is fixture-only, disabled by default, and intentionally excludes live provider execution, deploys, and paid benchmarks.

Agent handoff

  • One canonical issue is linked
  • No competing PR implements the same issue
  • Acceptance criteria are satisfied
  • Required checks pass on the current head
  • Human decision is requested only for product, security, irreversible infrastructure, or production approval

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
v0-uvai Canceled Canceled Sep 9, 2026 6:44am UTC

Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
Comment thread src/youtube_extension/services/agents/astra_backend.py Outdated
Copilot AI changed the title [WIP] Add GPT-6 Astra as optional disabled execution backend test(agents): add disabled GPT-6 Astra fixture backend Sep 8, 2026
Copilot AI requested a review from groupthinking September 8, 2026 23:55
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

🔍 PR Validation

⚠️ Large PR detected (1325 lines changed)

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA a6e46a4.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

Copy link
Copy Markdown
Owner

Execution receipt — 2026-09-09 — TEST

Advanced this existing draft rather than opening competing work for #1662.

Verified input: head 23ac4cb0cd4ee551d44afdfa2b80eab2b907190d. Offline lifecycle tests reproduced seven failures: expired/malformed deadlines accepted, repeated provider calls resetting applied results, cancelled runs reopening, completed-receipt dictionary keys leaking into receipts, prior receipt snapshots mutating, and changed-input call_id reuse accepted.

Implemented:

  • Preserve pending-call state/deadline on matching provider retries; reject changed input/policy.
  • Reject terminal-run reuse before transport.
  • Reject invalid/expired pending-call deadlines.
  • Snapshot pending calls/events and return actual completed receipt locators.
  • Keep plaintext-GO/cross-origin tests; use a new run after a terminal denial.

Commits: ae6d2bb0ffdf5e444f2e120f67db7af876f35862, fe4e3f8031e84140788688f17aad14c22abb0a53, a6e46a445d232e8140b559557989420448637caf.
Verification: all three resulting files fetched at the final commit and matched tested bytes. Focused pytest suite: 15 passed (seven existing tests plus eight lifecycle regressions), offline Python 3.12. This is NOT the full repository suite. Current-head CI has started; earlier Copilot-head workflows were action_required.

Remaining acceptance gaps (do not claim production readiness):

  1. Control-record issuer-string comparison is not independently verified provenance; bind records to trusted authorization storage and enforce nonce/revocation semantics.
  2. Reusing one in-memory store across backend objects is not durable process restart persistence.
  3. Comparison fields hard-code idle time/duplicate rate; mark unmeasured data unknown and run a real comparison before asserting gains.
  4. Token/output caps and network policy need independently enforced execution-path checks, not only caller estimates or post-result declarations.

Owner: Agent Factory implementation/review for #1662. State: fixture lifecycle repair verified; broader security/durability acceptance remains open. Next: inspect current-head CI, then address those bounded gaps with negative tests. No merge, production deployment, or paid provider invocation performed.

Copy link
Copy Markdown
Owner

Current-head verification update — 2026-09-09

At a6e46a445d232e8140b559557989420448637caf, CI3844 now passed, including frontend tests, TypeScript/build, guards and Python tests.

Python job log: 8,234 passed, 6 deselected, 5 xpassed, 102 warnings. This does not erase warnings or imply live-provider verification.
Security, CodeQL and secret scanning passed. Dependency review reports success but also warns that no head snapshots were available; do not treat it as full dependency coverage.
Coverage34320454842 is still running at this check; E2E was skipped. Original lifecycle/security acceptance limitations in receipt5597354814 remain open. Draft and unmerged verified.

Copy link
Copy Markdown
Owner

Verification closure — 2026-09-10

Coverage run 3349 has now completed successfully on current head a6e46a445d232e8140b559557989420448637caf.

The complete applicable gate set is now green: CI, Coverage, Security, CodeQL, Dependency Review and Secret Scan. E2E remained skipped, so this is still fixture-only verification—not live Astra conformance or production readiness. The authorization-provenance and durable-store gaps listed in the execution receipt remain intentionally open. Draft state preserved; no merge or provider invocation.

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

Labels

Projects

None yet

2 participants