Refactor daily audit import stack into shared daily-audit-base component#26654
Refactor daily audit import stack into shared daily-audit-base component#26654
daily-audit-base component#26654Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b2a7654e-a04f-4323-803e-ec4508163954 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b2a7654e-a04f-4323-803e-ec4508163954 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b2a7654e-a04f-4323-803e-ec4508163954 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
daily-audit-base component
There was a problem hiding this comment.
Pull request overview
Refactors the common “daily audit” workflow import stack (discussion publishing + reporting guidance + OTLP observability) into a single shared wrapper and migrates the identified workflows to use it.
Changes:
- Added
shared/daily-audit-base.mdwrapper that composesdaily-audit-discussion,reporting, andobservability-otlpwithtitle-prefixpassthrough (+ optionalexpires). - Updated 10 daily workflows (and their compiled
.lock.ymlcounterparts) to replace the triple-import stack with the new base wrapper. - Updated authoring documentation and inline guidance to point to the new wrapper.
Show a summary per file
| File | Description |
|---|---|
| pkg/testutil/spec_test.go | Minor struct-literal alignment changes in YAML comment header tests. |
| docs/src/content/docs/guides/deterministic-agentic-patterns.md | Recommends using shared/daily-audit-base.md for daily discussion-based audit workflows. |
| .github/workflows/shared/daily-audit-discussion.md | Adds guidance to prefer the new base wrapper when reporting+OTLP are also needed. |
| .github/workflows/shared/daily-audit-base.md | New shared wrapper bundling discussion + reporting + OTLP with input passthrough. |
| .github/workflows/daily-team-evolution-insights.md | Migrates imports to shared/daily-audit-base.md. |
| .github/workflows/daily-team-evolution-insights.lock.yml | Regenerated compiled workflow after import refactor. |
| .github/workflows/daily-secrets-analysis.md | Migrates imports to shared/daily-audit-base.md. |
| .github/workflows/daily-secrets-analysis.lock.yml | Regenerated compiled workflow after import refactor. |
| .github/workflows/daily-regulatory.md | Migrates imports to shared/daily-audit-base.md. |
| .github/workflows/daily-regulatory.lock.yml | Regenerated compiled workflow after import refactor. |
| .github/workflows/daily-performance-summary.md | Migrates imports to shared/daily-audit-base.md. |
| .github/workflows/daily-performance-summary.lock.yml | Regenerated compiled workflow after import refactor. |
| .github/workflows/daily-observability-report.md | Migrates imports to shared/daily-audit-base.md. |
| .github/workflows/daily-observability-report.lock.yml | Regenerated compiled workflow after import refactor. |
| .github/workflows/daily-issues-report.md | Migrates imports to shared/daily-audit-base.md. |
| .github/workflows/daily-issues-report.lock.yml | Regenerated compiled workflow after import refactor. |
| .github/workflows/daily-integrity-analysis.md | Migrates imports to shared/daily-audit-base.md. |
| .github/workflows/daily-integrity-analysis.lock.yml | Regenerated compiled workflow after import refactor. |
| .github/workflows/daily-firewall-report.md | Migrates imports to shared/daily-audit-base.md. |
| .github/workflows/daily-firewall-report.lock.yml | Regenerated compiled workflow after import refactor. |
| .github/workflows/daily-compiler-quality.md | Migrates imports to shared/daily-audit-base.md. |
| .github/workflows/daily-compiler-quality.lock.yml | Regenerated compiled workflow after import refactor. |
| .github/workflows/daily-code-metrics.md | Migrates imports to shared/daily-audit-base.md. |
| .github/workflows/daily-code-metrics.lock.yml | Regenerated compiled workflow after import refactor. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 23/24 changed files
- Comments generated: 1
| @@ -144,8 +144,8 @@ func TestSpec_PublicAPI_StripYAMLCommentHeader(t *testing.T) { | |||
| expected: "runs-on: ubuntu-latest\n", | |||
| }, | |||
| { | |||
| name: "strips multi-line comment block before YAML document separator", | |||
| input: "# Header\n# More header\n---\njobs:\n build:\n runs-on: ubuntu-latest\n", | |||
| name: "strips multi-line comment block before YAML document separator", | |||
| input: "# Header\n# More header\n---\njobs:\n build:\n runs-on: ubuntu-latest\n", | |||
| expected: "---\njobs:\n build:\n runs-on: ubuntu-latest\n", | |||
There was a problem hiding this comment.
This PR is scoped to workflow import refactoring, but this hunk in spec_test.go only changes struct literal field alignment (no functional change). Consider dropping this formatting-only change to keep the PR focused and reduce merge/conflict noise (or run gofmt across the file/package if the intent is to normalize formatting).
🧪 Test Quality Sentinel ReportTest Quality Score: 85/100✅ Excellent test quality
Test Classification DetailsView All 7 Tests
Flagged Tests — Requires ReviewNo tests flagged. All tests enforce observable behavioral contracts with proper assertion messages and build tags. Minor observation (not blocking): Edge/error case coverage is modest at 43% (3 of 7 tests). Tests
Language SupportTests analyzed:
Verdict
📖 Understanding Test ClassificationsDesign Tests (High Value) verify what the system does:
Implementation Tests (Low Value) verify how the system does it:
Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators. References: §24516631498
|
There was a problem hiding this comment.
✅ Test Quality Sentinel: 85/100. Test quality is excellent — 0% of new tests are implementation tests (threshold: 30%). The only change to pkg/testutil/spec_test.go is a whitespace alignment fix; all 7 tests in the file are well-structured behavioral design tests with proper build tags and descriptive assertion messages.
This issue identified repeated use of the same daily-audit import trio across workflows (
daily-audit-discussion+reporting+observability-otlp) and requested consolidation behind a shared wrapper withtitle-prefixpassthrough.This PR introduces that wrapper and migrates the 10 confirmed triple-import workflows to it.
New shared import wrapper
.github/workflows/shared/daily-audit-base.mdshared/daily-audit-discussion.mdshared/reporting.mdshared/observability-otlp.mdtitle-prefix(required)expires(optional, default3d)Workflow migration (10 confirmed triple-import workflows)
shared/daily-audit-base.mdimport in:daily-code-metrics.mddaily-compiler-quality.mddaily-firewall-report.mddaily-integrity-analysis.mddaily-issues-report.mddaily-observability-report.mddaily-performance-summary.mddaily-regulatory.mddaily-secrets-analysis.mddaily-team-evolution-insights.mdtitle-prefixand any explicitexpiresoverride.Related authoring guidance
shared/daily-audit-base.mdfor daily discussion-based audit workflows in:docs/src/content/docs/guides/deterministic-agentic-patterns.mdshared/daily-audit-discussion.mdpointing authors to the new wrapper when reporting+OTLP are also needed.Example (before/after)
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOWORK 64/bin/go /opt/hostedtoolcGOPROXY -o /tmp/go-build204GOSUMDB -trimpath 64/bin/go -p github.com/githu-w -lang=go1.25 go(http block)/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOWORK 64/bin/go /opt/hostedtoolcGOPROXY -o /tmp/go-build204GOSUMDB -trimpath 64/bin/go -p main -lang=go1.25 go(http block)/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw --ignore-path ../../../.pretti. /opt/hostedtoolc-v -o /tmp/go-build204GOSUMDB -trimpath 64/bin/go -p main -lang=go1.25 go(http block)https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b/usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)https://api.github.com/repos/githubnext/agentics/git/ref/tags/-/usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/- --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go(http block)If you need me to access, download, or install something from one of these locations, you can either: