Skip to content

refactor: extract standard repo-memory configuration into shared/repo-memory-standard.md#24100

Merged
pelikhan merged 3 commits intomainfrom
copilot/refactor-repo-memory-configuration
Apr 2, 2026
Merged

refactor: extract standard repo-memory configuration into shared/repo-memory-standard.md#24100
pelikhan merged 3 commits intomainfrom
copilot/refactor-repo-memory-configuration

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 2, 2026

20 workflows repeated an identical 7–8 line repo-memory block differing only in branch-name and description, causing glob pattern drift (some missing .jsonl/.csv).

Changes

New shared component: shared/repo-memory-standard.md

Parametrized via import-schema with branch-name (required), description (required), and max-file-size (optional, default: 102400). Auto-generates the standard 4-type glob pattern from branch-name.

# Before — repeated in every workflow:
tools:
  repo-memory:
    branch-name: memory/nlp-analysis
    description: "Historical NLP analysis results"
    file-glob: ["memory/nlp-analysis/*.json", "memory/nlp-analysis/*.jsonl",
                "memory/nlp-analysis/*.csv", "memory/nlp-analysis/*.md"]
    max-file-size: 102400  # 100KB

# After:
imports:
  - uses: shared/repo-memory-standard.md
    with:
      branch-name: "memory/nlp-analysis"
      description: "Historical NLP analysis results"

Compiler fix: pkg/parser/import_field_extractor.go

import-schema default values were silently ignored during ${{ github.aw.import-inputs.* }} substitution in shared component frontmatter — unsubstituted expressions fell through to system defaults (e.g. max-file-size resolved to 10 KB instead of 100 KB). Added applyImportSchemaDefaults() to augment the caller's with map with schema defaults before substitution.

Migrated 9 workflows

audit-workflows, copilot-agent-analysis, copilot-pr-nlp-analysis, copilot-pr-prompt-analysis, copilot-session-insights, daily-copilot-token-report, daily-news, delight, discussion-task-miner.

delight and discussion-task-miner also had their globs normalized to the full 4-type set (.json, .jsonl, .csv, .md) — they previously omitted .jsonl and .csv.

The remaining 11 workflows listed in the issue use incompatible patterns (wildcard globs, shared branches, campaign prefixes, non-standard file types or size limits) and were left unchanged.

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
    • Triggering command: /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 cp-script.md p/bin/grep grep -l re re ndor/bin/grep imports: -format.md grep grep (http block)
    • Triggering command: /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 cp-script.md grep grep -l imports: ithub/workflows/notion-issue-summary.md cal/bin/grep imports: shared/safe-outp--norc ndor/bin/grep grep (http block)
    • Triggering command: /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 r-analysis-base.-c k/_temp/uv-pytho import sys with open('.github/workflows/copilot-agent-analysis.md') as f: content = f.read() parts = content.split('---') print(parts[1]) # frontmatter grep -l imports: ithub/workflows/notion-issue-summary.md p/bin/grep imports: shared/qmd.md cal/bin/grep grep (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD ode-gyp-bin/node-json go env ck 'scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha k/gh-aw/gh-aw/.g-p c (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --git-dir node /usr/bin/git prettier --check 64/bin/go git rev-�� --show-toplevel go /opt/hostedtoolcache/node/24.14.1/x64/bin/node -json GO111MODULE 64/bin/go /opt/hostedtoolcache/node/24.14.1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel go /usr/bin/git 5ZHK/kucq2A0Qw27git GO111MODULE /opt/hostedtoolc--show-toplevel git rev-�� --show-toplevel 4607298/b001/importcfg /usr/bin/git k/gh-aw/gh-aw/acgit GO111MODULE 1/x64/bin/node git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha -json GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -ato�� k/gh-aw/gh-aw/pkg/cli -buildtags /usr/bin/git l -ifaceassert -nilfunc git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha 3255015815 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE util.test GOINSECURE GOMOD GOMODCACHE util.test (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha needs.build.outputs.version go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel go /usr/bin/git -json GO111MODULE 64/pkg/tool/linu--show-toplevel git rev-�� --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git -json GO111MODULE /opt/hostedtoolc--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha /tmp/TestHashStability_SameInputSameOutput2678442402/001/stability-test.md go /usr/bin/git -json GO111MODULE 64/bin/go git conf�� --get remote.origin.url /usr/bin/git "prettier" --chegit GOPROXY 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha y --jq /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel /...; \ else \ -tests /usr/bin/git "prettier" --chegit GOPROXY 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git 0442-49869/test-git GO111MODULE ache/go/1.25.0/x--show-toplevel git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 1/x64/bin/node git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha submodules | head -n 10 /home/REDACTED/work/gh-aw/gh-aw/.github/workflows/ubuntu-image-ana/home/REDACTED/work/gh-aw/gh-aw/.g--norc /home/REDACTED/go/bin/grep imports: md ndor/bin/grep grep -l imports: /home/REDACTED/worowner=github cal/bin/bash s/copilot-pr-probash ue-to-user.md cal/bin/grep grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --noprofile grep bash imports: nalyzer.md de/node/bin/grep--noprofile git push�� ithub/workflows origin (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go k/gh�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD erignore go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --show-toplevel go r,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,disp--show-toplevel -json flow-test-12345 64/bin/go git remo�� remove origin /usr/bin/git "prettier" --chegit GOPROXY 64/bin/go git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel resolved$ /usr/bin/git with-tools.md GO111MODULE 64/bin/go git remo�� add origin /usr/bin/git "prettier" --chegit GOPROXY 64/bin/go git (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha imports: ithub/workflows/github-mcp-structural-analysis.md rep imports: reat-scan.md n-dir/grep grep -l imports: ithub/workflows/weekly-editors-health-check.md 64/bin/grep imports: atterns.md rep grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha /home/REDACTED/wor-errorsas rev-parse 64/bin/bash imports: ithub/workflows/rev-parse ache/go/1.25.0/x--show-toplevel git -C ire/doc.go ire/forward_requirements.go x_amd64/vet remote.origin.ur/usr/libexec/docker/docker-init ithub/workflows/--version k/_temp/ghcca-node/node/bin/grep-bool x_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility imports: k/gh-aw/gh-aw/.github/workflows/notion-issue-summary.md ache/uv/0.11.3/x86_64/grep imports: ity-report.md 64/bin/grep grep -l imports: k/gh-aw/gh-aw/.github/workflows/commit-changes-analyzer.md r: $owner, name: $name) { hasDiscussionsEnabled } } e.md xer.md de/node/bin/grepinspect grep (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw --jq .visibility /home/REDACTED/work/gh-aw/gh-aw/.g-errorsas config x_amd64/vet remote.origin.urgit k/gh-aw/gh-aw/.g-C r: $owner, name:/home/REDACTED/work/gh-aw/gh-aw/.github/workflows x_amd64/vet --no�� --noprofile grep r: $owner, name: $name) { hasDiscussionsEnabled } } imports: k/gh-aw/gh-aw/.gimage 5bba01d1 64/pkg/tool/linumcp/markitdown (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0 --jq .object.sha imports: ithub/workflows/github-mcp-structural-analysis.md (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0 --jq .object.sha k/gh-aw/gh-aw/.g-errorsas -f /usr/bin/infocmp-nilfunc l owner=github -f infocmp -1 xterm-color grep x_amd64/compile content = f.git ithub/workflows/-C /home/REDACTED/.co/home/REDACTED/work/gh-aw/gh-aw/.github/workflows x_amd64/compile (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq .object.sha k/gh-aw/gh-aw/.github/workflows/auto-triage-issues.md go /usr/bin/git b9Lx/FWQ_gVPMJ38git GO111MODULE 64/bin/go git rev-�� --show-toplevel 3860795/b381/impconfig /usr/bin/git k/gh-aw/gh-aw/cmgit k/gh-aw/gh-aw/cmrev-parse 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq .object.sha 0442-49869/test-3429793473 GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go 4607�� -json 4607298/b070/_testmain.go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linu-buildtags (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq .object.sha licyMinIntegrityOnlymin-integrity_with_repos=public_1946148963/001 GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 1/x64/bin/node GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linuREDACTED (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 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/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 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/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ty-test.md GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 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/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 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/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE x_amd64/link GOINSECURE GOMOD GOMODCACHE x_amd64/link (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ck 'scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE node (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 GOMOD GOMODCACHE go env hub/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq .object.sha --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha -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/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE sh (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha imports: ithub/workflows/copilot-pr-nlp-analysis.md $name) { hasDiscussionsEnabled } } imports: er-lifecycle.md ache/node/24.14.graphql grep -l tions-lock.json -f ithub/workflows/owner=github ep imports: (http block)
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha /home/REDACTED/work/gh-aw/gh-aw/.g-p rev-parse $name) { hasDiscussionsEnabled } } imports: ithub/workflows/api k/_temp/ghcca-nographql x_amd64/vet -1 xterm-color grep x_amd64/vet imports: k/gh-aw/gh-aw/.g-C /home/REDACTED/.co/home/REDACTED/work/gh-aw/gh-aw/.github/workflows x_amd64/vet (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env b/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ck 'scripts/**/*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/owner/repo/contents/file.md
    • Triggering command: /tmp/go-build3084607298/b396/cli.test /tmp/go-build3084607298/b396/cli.test -test.testlogfile=/tmp/go-build3084607298/b396/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE go env ck '**/*.cjs' '*GOINSECURE GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name GOSUMDB GOWORK 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:

Copilot AI and others added 2 commits April 2, 2026 13:08
…ard.md

- Create .github/workflows/shared/repo-memory-standard.md with import-schema
  supporting branch-name (required), description (required), and max-file-size
  (optional, default: 102400)
- Migrate 9 workflows to use the shared component:
  audit-workflows, copilot-agent-analysis, copilot-pr-nlp-analysis,
  copilot-pr-prompt-analysis, copilot-session-insights,
  daily-copilot-token-report, daily-news, delight, discussion-task-miner
- Fix compiler bug: import-schema default values were not applied when
  substituting ${{ github.aw.import-inputs.* }} expressions in shared
  component frontmatter (applyImportSchemaDefaults in import_field_extractor.go)
- Recompile all 179 workflow lock files

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/a958f3cf-f41e-4215-a49f-88dc14c15cf8

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor to extract standard repo-memory configuration into shared component refactor: extract standard repo-memory configuration into shared/repo-memory-standard.md Apr 2, 2026
Copilot AI requested a review from pelikhan April 2, 2026 13:13
@pelikhan pelikhan marked this pull request as ready for review April 2, 2026 13:16
Copilot AI review requested due to automatic review settings April 2, 2026 13:16
@pelikhan pelikhan merged commit 5815bfc into main Apr 2, 2026
52 checks passed
@pelikhan pelikhan deleted the copilot/refactor-repo-memory-configuration branch April 2, 2026 13:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces repo-memory configuration drift across workflows by extracting a standardized repo-memory block into a parameterized shared component, and fixes the compiler so import-schema default values are applied during ${{ github.aw.import-inputs.* }} substitution.

Changes:

  • Added .github/workflows/shared/repo-memory-standard.md (parameterized via import-schema) to generate consistent repo-memory globs and default max-file-size.
  • Updated pkg/parser/import_field_extractor.go to apply import-schema defaults before import-input substitution.
  • Migrated 9 workflows to use the shared repo-memory component (and regenerated their .lock.yml manifests), normalizing missing glob types where applicable.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pkg/parser/import_field_extractor.go Applies import-schema defaults before substituting github.aw.import-inputs.* placeholders.
.github/workflows/shared/repo-memory-standard.md New shared repo-memory component with standardized glob set and defaulted max-file-size.
.github/workflows/audit-workflows.md Switches inline repo-memory tool config to shared import.
.github/workflows/audit-workflows.lock.yml Regenerated lock file reflecting the new shared import.
.github/workflows/copilot-agent-analysis.md Switches inline repo-memory tool config to shared import.
.github/workflows/copilot-agent-analysis.lock.yml Regenerated lock file reflecting the new shared import.
.github/workflows/copilot-pr-nlp-analysis.md Switches inline repo-memory tool config to shared import.
.github/workflows/copilot-pr-nlp-analysis.lock.yml Regenerated lock file reflecting the new shared import.
.github/workflows/copilot-pr-prompt-analysis.md Switches inline repo-memory tool config to shared import.
.github/workflows/copilot-pr-prompt-analysis.lock.yml Regenerated lock file reflecting the new shared import.
.github/workflows/copilot-session-insights.md Switches inline repo-memory tool config to shared import.
.github/workflows/copilot-session-insights.lock.yml Regenerated lock file reflecting the new shared import.
.github/workflows/daily-copilot-token-report.md Switches inline repo-memory tool config to shared import.
.github/workflows/daily-copilot-token-report.lock.yml Regenerated lock file reflecting the new shared import.
.github/workflows/daily-news.md Switches inline repo-memory tool config to shared import.
.github/workflows/daily-news.lock.yml Regenerated lock file reflecting the new shared import.
.github/workflows/delight.md Switches inline repo-memory tool config to shared import (and normalizes glob set).
.github/workflows/delight.lock.yml Regenerated lock file reflecting the new shared import and updated constraints.
.github/workflows/discussion-task-miner.md Switches inline repo-memory tool config to shared import (and normalizes glob set).
.github/workflows/discussion-task-miner.lock.yml Regenerated lock file reflecting the new shared import and updated constraints.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

required: true
description: "Human-readable description of what is stored"
max-file-size:
type: integer
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import-schema supported types in this repo are string, number, boolean, choice, array, object (see docs/src/content/docs/reference/imports.md). Using type: integer here means the compiler's type validation will silently skip this field, so callers could pass non-numeric values without an error. Consider changing this to type: number (and keep the default as 102400).

Suggested change
type: integer
type: number

Copilot uses AI. Check for mistakes.
Comment on lines 83 to 89
if len(item.inputs) > 0 {
rawContent = substituteImportInputsInContent(rawContent, item.inputs)
// Apply import-schema defaults for any optional parameters not supplied by the caller,
// so that ${{ github.aw.import-inputs.<key> }} expressions for defaulted parameters
// are replaced with their declared default values rather than left as literal strings.
inputsWithDefaults := applyImportSchemaDefaults(rawContent, item.inputs)
rawContent = substituteImportInputsInContent(rawContent, inputsWithDefaults)
}
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change fixes default handling for import-schema, but there isn't any test coverage that exercises the new behavior (i.e., omit an optional with key that has a default and assert the placeholder is substituted in frontmatter/markdown). Adding a regression test would help prevent future drift, especially for cases like max-file-size where the engine previously fell back to repo-memory system defaults.

See below for a potential fix:


	// Apply import-schema defaults for any optional parameters not supplied by the caller,
	// so that ${{ github.aw.import-inputs.<key> }} expressions for defaulted parameters
	// are replaced with their declared default values rather than left as literal strings.
	// This runs even when the caller provides no explicit inputs, so defaults-only schemas
	// still participate in compile-time substitution.
	inputsWithDefaults := applyImportSchemaDefaults(rawContent, item.inputs)
	if len(inputsWithDefaults) > 0 {
		rawContent = substituteImportInputsInContent(rawContent, inputsWithDefaults)
	}

	// Extract tools from imported file.
	// When inputs (including defaults from import-schema) are present we use the
	// already-substituted content (to pick up any ${{ github.aw.import-inputs.* }}
	// expressions in the tools/mcp-servers frontmatter) rather than re-reading the
	// original file from disk.
	var toolsContent string
	if len(inputsWithDefaults) > 0 {

Copilot uses AI. Check for mistakes.
Comment on lines 83 to +88
if len(item.inputs) > 0 {
rawContent = substituteImportInputsInContent(rawContent, item.inputs)
// Apply import-schema defaults for any optional parameters not supplied by the caller,
// so that ${{ github.aw.import-inputs.<key> }} expressions for defaulted parameters
// are replaced with their declared default values rather than left as literal strings.
inputsWithDefaults := applyImportSchemaDefaults(rawContent, item.inputs)
rawContent = substituteImportInputsInContent(rawContent, inputsWithDefaults)
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applyImportSchemaDefaults reparses the imported file frontmatter to read import-schema, but this file is parsed again later (substituted frontmatter at ExtractFrontmatterFromContent(rawContent) and original frontmatter again for schema validation). If import-heavy workflows become common, this adds avoidable YAML parse work per import. Consider reusing the already-parsed original frontmatter/schema (or returning both the augmented inputs and parsed schema) to keep parsing to one pass.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[refactoring] Extract standard repo-memory configuration into parametrized shared component

3 participants