Skip to content

Latest commit

 

History

History
107 lines (99 loc) · 3.3 KB

smoke-repo-memory-ledger.md

File metadata and controls

107 lines (99 loc) · 3.3 KB
private true
emoji 🧪
name Smoke Repo-Memory Ledger
description Smoke test for structured Git-backed ledger projections and append operations
true
schedule workflow_dispatch
every 2 days
permissions
contents copilot-requests
read
write
engine
id
copilot
model copilot/gpt-5.3-codex
runtimes
python
version
3.11
imports
uses with
shared/session-artifact-check.md
session-artifact
copilot-events
sandbox
agent
id
awf
tools
ledger
smoke
type key schema max-record-kb max-patch-kb
table
workflow_run_id
type required properties additionalProperties
object
record_type
workflow_run_id
result
record_type workflow_run_id result
enum
repo_memory_ledger_smoke
type
string
enum
passed
false
4
10
safe-outputs
create-issue noop
max title-prefix labels close-older-issues close-older-key
1
[smoke-repo-memory-ledger]
automation
testing
true
smoke-repo-memory-ledger
timeout-minutes 10
strict true
features
gh-aw-detection
evals
id question
ledger_status_checked
Did the agent successfully inspect repo-memory ledger status?
id question
ledger_record_round_trip
Did the agent validate a prior persisted record and submit the current run record if absent?

Git-Backed Ledger Smoke Test

Exercise the replayed read-only SQLite projection and safe-output append without editing ledger files directly. Use the configured Python runtime's sqlite3 standard library with mode=ro to query the projection. It is a snapshot made before this run's safe outputs; accepted writes become durable only after push_ledger_changes succeeds.

  1. Query the projection at /tmp/gh-aw/ledgers/smoke/ledger.db for diagnostics. Report malformed or incomplete records, but do not fail solely because of unrelated historical diagnostics.

  2. Query state for prior run records. Verify any existing rows have a key matching the JSON workflow_run_id, with record_type equal to repo_memory_ledger_smoke and result equal to passed. An empty table is expected on the first successful run. Also query for the current run:

    SELECT key, value FROM state
    WHERE key = '${{ github.run_id }}'
    LIMIT 1;
  3. If no record exists, submit one ledger_append record:

    {
      "ledger": "smoke",
      "operation": "upsert",
      "value": {
        "record_type": "repo_memory_ledger_smoke",
        "workflow_run_id": "${{ github.run_id }}",
        "result": "passed"
      }
    }
  4. Do not expect the current run's append to appear in this run's projection. Verify it on the next run; on reruns, reuse an existing current-run row instead of appending a duplicate.

  5. Do not inspect or modify ledger shard files directly.

If every check passes, call noop with a brief summary. If any ledger operation fails or a prior persisted record is incorrect, create one issue using the create_issue safe output. Include the failed check, relevant redacted error message, and run URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}. Never include secrets, raw ledger contents, or filesystem paths in the issue.