Repository navigation
Report durable session continuation in audit, health, and OpenTelemetry - #75984
Conversation
Co-authored-by: Copilot App <[email protected]>
|
❌ PR Specification Reviewer failed to deliver outputs. Please review the logs for details.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
❌ Design Decision Gate 🏗️ failed to deliver outputs during design decision gate check.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Ponytail Reviewer completed successfully!
|
There was a problem hiding this comment.
What this change does: It records durable restoration and native session startup, then exposes that evidence in audit, health, and telemetry.
Should fix:
-
Remove duplicate JSON validation (
pkg/cli/audit_report.go:1019)- What this is: This checks whether an error annotation contains a tool result.
- Problem: The new decoder checks for trailing data even though the original
json.Unmarshalalready rejects it. - Fix: Restore the original
json.Unmarshalcall. - If we skip it: We maintain two steps that do the same validation.
Verdict: Ship.
Lean: -5 lines possible.
Generated by ✂️ Ponytail Reviewer for #75984 · codex · routed: gpt61 medium · ~8 AIC · ⌖ ~1 AIC · ⊞ 181
Comment /ponytail to run again
|
Warning The 🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (>100 new lines) but does not have a linked Architecture Decision Record (ADR). 📄 Draft ADR committed:
🔍 Gate evidence
📋 What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision. ❓ Why ADRs Matter
ADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you. 📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
All ADRs are stored in
|
There was a problem hiding this comment.
Reviewed PR head 0cd7b4c against Unified Agent Session Specification. The durable-session behavior is an intentional, compatible extension and is now synchronized in the queued specification update: docs/src/content/docs/specs/unified-agent-session-specification.md version 2.8.0, requirements T-UAS-090 and T-UAS-091. The update defines metadata-only durable.restore/durable.session evidence, current run/attempt validation, unavailable-versus-fresh semantics, privacy boundaries, and validated gh-aw.durable.parent_run_id OTel correlation; serialization format remains v1. No blocking contract violations found. Static review only: tests and conformance scripts were not run per review instructions; prefetched diff and changed-file metadata were used.
Generated by PR Specification Reviewer for #75984 · copilot · gpt50 · ~6 AIC · ⌖ ~2 AIC · ⊞ 1.7K
Comment /review-specs to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /tdd, /diagnosing-bugs, /codebase-design, and /grill-with-docs. No blocking issues. Two robustness items are flagged inline.
📋 Key Themes & Highlights
Key Themes
- Robustness gaps: the Pi session ID has no length guard before a 128-character validator that throws after the session starts. A string-literal coupling ties audit detection to the restore step name.
Positive Highlights
- ✅ Run and attempt scoping is strict, and mismatched attempts are rejected.
- ✅ Symlink refusal uses
O_NOFOLLOW, and records are written at mode 0o600. - ✅ Metadata-only persistence is enforced by explicit exclusion tests.
- ✅ JS and Go validators agree on the
durable.restoreanddurable.sessionshapes. - ✅ Regression tests accompany the symlink and attempt-mismatch fixes.
- ✅ Docs and the unified session schema are updated in the same PR.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.3K
Comment /matt to run again
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Found three merge-blocking correctness risks in durable evidence handling: validator drift rejects locally generated records, optional artifact copying can abort the entire collection step, and recorder failures can relabel a successful restore as failed. Inline comments explain the failure modes and suggested direction. Static review only; no tests were run per review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~10 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
🟡 Changes recommended
Unvalidated provenance and timestamps can carry historical content into exported logs, while other active issues can fail valid workflows and misreport durable sessions.
6 open issues
Validate metadata fields and discard supplied provenance · New Make metadata recording best-effort during restoration · New Support full Pi session IDs in metadata length validation · New Make durable-session copy best-effort and include it in uploads · New Only report unavailable sessions when durability is configured · New Validate cache identity before counting durable resumptions · New
What changed in this PR
Adds durable-session continuation evidence to gh-aw’s runtime and reporting pipeline, distinguishing checkpoint restoration from observed native agent startup.
Changes:
- Record restoration and startup metadata, preserving it through artifacts and unified/compact sessions.
- Expose continuation evidence in audit, cached current-revision health, and OpenTelemetry.
- Update schemas, documentation, regression coverage, and three durable workflow locks.
| File | Description |
|---|---|
specs/otel/attributes.tsp |
Declare the durable parent-run attribute. |
schemas/logs-jsonl.schema.json |
Add durable-session report fields. |
schemas/audit.schema.json |
Extend the audit output schema. |
pkg/workflow/otel_attributes_generated.go |
Register the generated Go attribute. |
pkg/workflow/engine_durable_sessions_test.go |
Check metadata artifact inclusion. |
pkg/workflow/compiler_yaml_post_agent.go |
Collect durable metadata artifacts. |
pkg/cli/health_revisions.go |
Apply current-revision durable evidence. |
pkg/cli/health_metrics.go |
Add durable health report data. |
pkg/cli/health_durable.go |
Aggregate and render cached continuation evidence. |
pkg/cli/health_command.go |
Integrate session evidence into console output. |
pkg/cli/durable_session.go |
Validate and report durable continuation records. |
pkg/cli/durable_session_test.go |
Cover parsing, caching, health, and input boundaries. |
pkg/cli/audit_report.go |
Attach durable evidence and adjust log parsing. |
pkg/cli/audit_report_render.go |
Render durable evidence in audit output. |
pkg/cli/audit_render_output.go |
Reparse evidence when rendering cached audits. |
pkg/cli/audit_cache.go |
Refresh durable evidence from raw sessions. |
docs/src/content/docs/specs/unified-agent-session-specification.md |
Specify durable event semantics and provenance. |
docs/src/content/docs/reference/engines.md |
Explain continuation evidence and telemetry. |
docs/src/content/docs/reference/audit.md |
Document audit and health evidence fields. |
docs/public/schemas/unified-session.schema.json |
Define restoration and startup payloads. |
actions/setup/sh/collect_usage_artifact_files.sh |
Stage durable metadata for usage collection. |
actions/setup/session_parsers.go |
Embed the durable metadata helper. |
actions/setup/js/unified_session.test.cjs |
Cover durable collection and invalid evidence. |
actions/setup/js/unified_session.cjs |
Collect run-scoped durable events. |
actions/setup/js/unified_session_render.cjs |
Render durable event details. |
actions/setup/js/unified_session_payload.cjs |
Allowlist durable payload fields. |
actions/setup/js/types/unified_session.d.ts |
Add durable event types. |
actions/setup/js/send_otlp_span.cjs |
Add checkpoint lineage to agent spans. |
actions/setup/js/send_otlp_session_logs.test.cjs |
Cover parent-run log attributes. |
actions/setup/js/send_otlp_session_logs.cjs |
Export durable parent-run attributes. |
actions/setup/js/pi_durable_telemetry.cjs |
Add parent-run metadata to Pi spans. |
actions/setup/js/pi_durable_driver.test.cjs |
Check resumed identity and span lineage. |
actions/setup/js/pi_durable_driver.cjs |
Record Pi native-session startup. |
actions/setup/js/otel_contract.test.cjs |
Verify validated parent-run span attributes. |
actions/setup/js/otel_attributes_generated.cjs |
Register the generated JavaScript attribute. |
actions/setup/js/durable_session_record.test.cjs |
Cover metadata validation and file safety. |
actions/setup/js/durable_session_record.cjs |
Validate and write durable metadata records. |
actions/setup/js/durable_native_session.test.cjs |
Check fresh and resumed native identities. |
actions/setup/js/durable_native_session.cjs |
Record observed native startup. |
actions/setup/js/durable_artifact.test.cjs |
Cover restoration evidence statuses. |
actions/setup/js/durable_artifact.cjs |
Record checkpoint restoration outcomes. |
actions/setup/js/copilot_sdk_session.cjs |
Record startup after SDK session creation. |
actions/setup/js/copilot_harness.cjs |
Observe native Copilot startup activity. |
actions/setup/js/compact_unified_session.test.cjs |
Check durable lineage preservation. |
actions/setup/js/compact_unified_session.cjs |
Preserve prioritized durable metadata. |
.github/workflows/research.lock.yml |
Include metadata in recovery and upload paths. |
.github/workflows/daily-arxiv-researcher.lock.yml |
Include metadata in recovery and upload paths. |
.github/workflows/copilot-cli-deep-research.lock.yml |
Include metadata in recovery and upload paths. |
.changeset/patch-durable-session-observability.md |
Describe the patch release changes. |
Review effort: Max (auto)
Co-authored-by: Copilot App <[email protected]>
|
Copilot assignment requested for the following outstanding work:
Once you start work, post this work summary as a PR comment without the leading Copilot mention, including the Sous-chef head, work, and state lines below, to record that the assignment is running. Apply the necessary fixes on this PR's existing branch, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved; stop when only human review or CI remains. Do not merge or trigger CI. Sous-chef requested-head: f4c1041
|
Co-authored-by: gh-aw-bot <[email protected]>
Sous-chef requested-head: f4c1041 |
Co-authored-by: Copilot App <[email protected]>
|
In response to this comment: The log investigation identified a branch-protection permission failure in safe_outputs; the proposed specification patch was not applied. No blocking specification contract violations were found, and the publication limitation is documented in the PR body. |
|
In response to this comment: I am not treating reported_no_action as proof of complete review or successful publication. The PR body records independent validation and known CI limitations; this status comment requests no specific test change. |
|
In response to this comment: This completion notice contains no actionable finding, so no code change is needed for this comment. Separately posted findings are addressed on their own merits. |
|
In response to this comment: The missing ADR is committed in f4c1041 and linked under Architecture decision in the PR body. The original safe_outputs failure remains a token-permission issue, not evidence that the ADR gate has subsequently passed. |
|
In response to this comment: This completion notice is not approval: the review also recorded REQUEST_CHANGES and separate findings. Those findings are addressed individually rather than treating this notice as verification that the PR is ready. |
|
In response to this comment: This completion notice contains no specific correction to apply. It does not replace validation of the current revision or resolution of findings from other reviewers. |
|
In response to this comment: The automated push failed, so its claim that the draft was committed was not reliable; the completed ADR is committed in f4c1041 and linked in the PR body. It documents rationale, alternatives, and consequences; branch-protection safety checks were not bypassed, and no gate rerun is claimed. |
|
In response to this comment: The saved REQUEST_CHANGES context identifies separate findings, which are addressed individually. I am leaving the managed memory unchanged and am not treating it as a new action request. |
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
|
🎉 This pull request is included in a new release. Release: |


Summary
Durable workflows can restore checkpoints successfully while
health,audit, and unified sessions lack evidence of whether the native agent actually resumed. This adds explicit continuation evidence without treating restored files or an Actions success as proof of native startup.durable.restoreanddurable.sessionevents, including the parent run, checkpoint artifact, and exact native session ID. Preserve them through artifact collection, unified sessions, and compact transport.gh-aw.durable.parent_run_idto agent spans, durable session logs, and Pi durable spans without changing OTel trace/span parentage.Architecture decision
ADR: ADR-75984: Record durable session continuation as metadata evidence
Validation
make fmt,make build, andmake lint-cjsmake session-schemasand OTel registry generationgo test ./actions/setup ./pkg/cli ./pkg/workflow -run 'Durable|SessionParserSources|TestAudit|TestHealth' -count=1make recompile: 365/365 workflows compiledmake agent-report-progress: final lint, impacted tests, schema freshness, and workflow drift checks passedmake agent-report-progresspassed again before push, including 444 selected JavaScript tests and workflow lock freshnessCI investigation
impacted-go-tests: pre-existing main-branch router drift. The CI merge and its main base both omit.github/aw/index-search.mdfrom the generatedagentic-workflowsskill; this PR changes neither the router template nor its input file list. Follow-up belongs on main.JS Tests (shard 7/8): 31 failures reproduce locally inwork_queue_deployment_authority.test.cjs(13 pass). Work-queue sources and fixtures are unchanged from the PR's parent commit. Follow-up belongs to work-queue deployment authority, not this feature.safe_outputsfailures share a permission/configuration problem: the workflow token cannot read classic branch protection (Resource not accessible by integration), so the safety check correctly blocks automated pushes. No permissions, safety checks, or workflow infrastructure were changed. An administrator must resolve the token configuration before a rerun is useful.Live evidence and limitations
Existing arXiv and Copilot research runs restored previous checkpoints, but their historical sessions contain no durable-start events. The updated audit reports this as unavailable evidence; the bounded arXiv health sample reports three unavailable runs and zero confirmed resumptions. Offline fixtures verify exact-session reuse and parent telemetry. No workflows were dispatched or manually rerun, and historical session records were not rewritten.