Close SPDD conformance gaps for ADRs 27325/27327/27387/27476/27479#47637
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
🤖 PR Triage
Score breakdown: Impact 22 + Urgency 15 + Quality 15 Rationale: Draft PR touching ADR docs, conformance specs, JS helpers, and tests for safe-outputs/comment-memory. Moderate scope across multiple subsystems. Groups well with #47633 as a docs/spec batch. No CI data available.
|
There was a problem hiding this comment.
Pull request overview
Closes SPDD conformance gaps through regression guards, bounded comment-memory materialization, and synchronized ADR/spec documentation.
Changes:
- Adds Go conformance tests for compile-all errors and helper organization.
- Enforces and tests comment-memory size limits.
- Updates specifications and accepts five ADRs.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/engine_api_targets_file_organization_test.go |
Guards helper placement. |
pkg/cli/commands_file_watching_test.go |
Tests frontmatter read failures. |
actions/setup/js/comment_memory_helpers.cjs |
Defines memory-size limits. |
actions/setup/js/setup_comment_memory_files.cjs |
Enforces memory limits. |
actions/setup/js/setup_comment_memory_files.test.cjs |
Tests oversized-memory handling. |
docs/src/content/docs/specs/safe-outputs-specification.md |
Specifies memory safeguards. |
docs/src/content/docs/reference/safe-outputs.md |
Documents schema integration. |
docs/adr/27325-organize-workflow-helpers-by-semantic-responsibility.md |
Accepts helper-organization ADR. |
docs/adr/27327-parser-utility-test-strategy.md |
Accepts parser-testing ADR. |
docs/adr/27387-filter-non-frontmatter-markdown-during-compile-all.md |
Accepts compile-all filtering ADR. |
docs/adr/27476-extend-safe-outputs-dependencies-via-needs-field.md |
Adds safeguards and accepts ADR. |
docs/adr/27479-comment-memory-file-based-agent-memory-with-github-persistence.md |
Adds size norms and accepts ADR. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (1)
docs/adr/27476-extend-safe-outputs-dependencies-via-needs-field.md:80
- This normative statement names a validator that cannot inspect
safe-outputs.needs:detectSafeJobCyclesonly traverses custom jobs undersafe-outputs.jobs, and it runs before job assembly. Require the fullJobManager.ValidateDependenciespass instead, which is the existing gate that can detect cycles involving the consolidated job.
1. Safe-output custom job cycle detection **MUST** continue to run after `safe-outputs.needs` merge/validation so that new dependency edges cannot introduce cycles.
- Files reviewed: 12/12 changed files
- Comments generated: 5
- Review effort level: Medium
| } | ||
| let totalBytes = 0; | ||
| for (const [memoryId, content] of memoryMap.entries()) { | ||
| const contentBytes = Buffer.byteLength(content, "utf8"); |
| When `tools.comment-memory` is enabled, implementations MUST support this additional data-flow path: | ||
|
|
||
| 1. **GitHub comment → local files (pre-agent setup)**: A setup step reads the managed comment body from the target issue or pull request, extracts content between `<gh-aw-comment-memory id="...">` and `</gh-aw-comment-memory>`, and writes one file per memory entry under `/tmp/gh-aw/comment-memory/<memory_id>.md`. | ||
| - Setup MUST enforce memory-size safeguards: each materialized file MUST be ≤16 KiB and the aggregate materialized directory MUST be ≤48 KiB. Exceeding either limit MUST stop setup with an error. |
| brokenWorkflow := filepath.Join(workflowsDir, "broken.md") | ||
| err = os.WriteFile(brokenWorkflow, []byte("---\n"), 0o644) | ||
| require.NoError(t, err) | ||
| err = os.Chmod(brokenWorkflow, 0o000) | ||
| require.NoError(t, err) | ||
| t.Cleanup(func() { | ||
| _ = os.Chmod(brokenWorkflow, 0o644) | ||
| }) |
| forbiddenFunctionSignatures := []string{ | ||
| "func extractAPITargetHost(", | ||
| "func extractAPIBasePath(", | ||
| "func GetCopilotAPITarget(", | ||
| "func GetGeminiAPITarget(", | ||
| "const DefaultGeminiAPITarget", | ||
| } |
|
|
||
| ### Safeguards | ||
|
|
||
| - Dependency cycles introduced through `safe-outputs.needs` are prevented by keeping custom safe-job cycle detection (`detectSafeJobCycles`) as a required compile-time validation gate. |
|
@copilot please run the
|
This PR addresses the SPDD queue gaps for five draft ADRs by adding missing conformance guards/tests and aligning comment-memory/safe-outputs specs with implemented behavior. It also promotes the covered ADRs to Accepted where implementation and verification now match normative requirements.
Compile-all frontmatter error-handling conformance (ADR-27387)
pkg/cli/commands_file_watching_test.goDurable helper-organization guard (ADR-27325)
awf_helpers.goand remain inengine_api_targets.go.pkg/workflow/engine_api_targets_file_organization_test.goComment-memory prompt-size safeguards (ADR-27479)
16 KiB48 KiBactions/setup/js/comment_memory_helpers.cjsactions/setup/js/setup_comment_memory_files.cjsactions/setup/js/setup_comment_memory_files.test.cjsSafe-outputs needs/spec sync (ADR-27476)
safe-outputs.needsand added norms/safeguard language for cycle protection + schema/IDE sync expectations.docs/adr/27476-extend-safe-outputs-dependencies-via-needs-field.mddocs/src/content/docs/reference/safe-outputs.mdpkg/parser/schemas/main_workflow_schema.json(already aligned; documented explicitly)ADR status and REASONS completion
27325,27327,27387,27476,27479from Draft → Accepted.Run: https://github.com/github/gh-aw/actions/runs/30042541462