Skip to content

Treat explicit default --dir as the default workflow directory in compile - #78312

Merged
pelikhan merged 2 commits into
mainfrom
pelikhan/scaling-succotash
Nov 16, 2026
Merged

pelikhan merged 2 commits into
mainfrom
pelikhan/scaling-succotash

Conversation

@pelikhan

Copy link
Copy Markdown
Collaborator

Compiling with an explicit --dir .github/workflows produced different output than compiling with no --dir: the lock file kept GH_AW_ACTION_FAILURE_ISSUE_EXPIRES_HOURS: "168" instead of "0", and maintenance workflow generation was skipped. gh aw update hits this path because its action-ref updater always passes the default directory explicitly.

Cause

compile_pipeline.go used config.WorkflowDir == "" to decide whether a compile targets the default directory, so naming the default directory explicitly was treated as a custom --dir.

Change

  • Add CompileConfig.usesDefaultWorkflowDir(), which returns true for an empty dir or any path that cleans to constants.GetWorkflowDir() (e.g. ./.github/workflows/).
  • Use it for the implicit expiry-marker reconciliation (specific-file compiles), maintenance/work-queue/slash-command generation (directory compiles), and the --dependabot custom-dir validation.

Behavior note

gh aw compile --dir .github/workflows now also generates maintenance workflows, matching the no---dir behavior. Real custom directories are unchanged.

Testing

Extended TestUpdateCompilation_ReconcilesDefaultActionFailureExpiry to recompile with .github/workflows and ./.github/workflows/; it fails without the fix (dir=".github/workflows") and passes with it. Targeted pkg/cli compile/update/upgrade/maintenance tests pass.

Compiling with --dir .github/workflows (as gh aw update/upgrade do) skipped
action-failure expiry marker reconciliation and maintenance generation,
emitting GH_AW_ACTION_FAILURE_ISSUE_EXPIRES_HOURS "168" instead of "0".

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review November 16, 2026 07:53
Copilot AI adaptive review requested due to automatic review settings November 16, 2026 07:53
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated by Ponytail Reviewer for #78312 · codex · routed: gpt61 medium · ~4 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~6 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by PR Specification Reviewer for #78312 · copilot · gpt56 · ~2 AIC · ⌖ ~2 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.5K · ◷

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the changed lines and specialist pass. No actionable correctness, regression, performance, or maintainability issues found. The absolute-path concern is not applicable because --dir absolute paths are rejected by existing validation; the explicit-default maintenance generation is intentional per the PR description. Static review only; tests were not run.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.5K
Comment /review to run again

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-61030664-ec4c-44ff-bb3c-dd7c0dabc175","parents":[],"payload":{"id":"ldg-fa14f97f-ca3d-42d1-ae51-4db801022fc6","operation":"append","value":{"finding_count":0,"head_sha":"98f904d3ba3fd5cfff81c7d5b2263b9369355cae","outcome":"aligned"}},"sha":"sha256:b626a7fe855254ff6ce8bfcbd9dab32b715ca5dad914634a6a4920c320ee8db4","timestamp":"2026-11-16T08:00:43.882Z","type":"ledger_append","version":1}
History

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-a954cedf-9361-4b37-b1fe-dd094905c56f","parents":[],"payload":{"id":"ldg-54a4c2f5-8f01-4119-8d34-d0baa33dd202","operation":"append","value":{"finding_count":0,"head_sha":"98f904d3ba3fd5cfff81c7d5b2263b9369355cae","outcome":"no_findings"}},"sha":"sha256:fb0f463c978c1b085a3776ee0a258e4f689a52dc0c773f80db0a6d82d2ae0c52","timestamp":"2026-11-16T08:02:00.498Z","type":"ledger_append","version":1}
History

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the changes aligning explicit default-directory handling with implicit defaults.

No open issues 🎉

What changed in this PR

This PR makes explicit --dir .github/workflows behave like omitting --dir in gh aw compile, fixing compilation through gh aw update while preserving custom-directory behavior.

Changes:

  • Centralize default-directory detection, including normalized path variants.
  • Apply that detection to expiry reconciliation, generated workflows, and --dependabot validation.
  • Extend regression coverage for explicit default-directory paths.
File Description
pkg/​cli/​update_compile_test.go Verify expiry reconciliation for two explicit default-directory forms.
pkg/​cli/​compile_validation.go Use shared default-directory detection for --dependabot validation.
pkg/​cli/​compile_pipeline.go Enable default-directory post-processing when the directory is explicit.
pkg/​cli/​compile_config.go Add a helper that recognizes empty and normalized default-directory paths.

Review effort: Balanced (dynamic)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Skills-Based Review 🧠

Applied /diagnosing-bugs and /tdd. The fix is correct and the regression test catches the bug. One test gap remains.

📋 Key Themes and Verification

Verification

  • Targeted pkg/cli tests pass (TestUpdateCompilation_ReconcilesDefaultActionFailureExpiry, dependabot validation, compile validation). go vet is clean and gofmt reports no changes.
  • Mutation check: removing the usesDefaultWorkflowDir path check makes the new dir=".github/workflows" assertion fail, so the test guards the bug.
  • The helper matches the existing dependabot tests, which already accept .github/workflows and reject custom/workflows.

Key Themes

  • Untested behavior change: the PR notes that explicit --dir .github/workflows now generates maintenance workflows, but no test covers that. See the inline comment.
  • Possible gap, not verified: the Dependabot branch in compile_pipeline.go (about line 999) still joins the raw config.WorkflowDir. An empty value may resolve manifests to the git root. It predates this PR and I did not reproduce it end to end, so treat it as a lead.

Positive Highlights

  • ✅ One helper, usesDefaultWorkflowDir(), replaces three inconsistent checks.
  • ✅ The test runs both .github/workflows and ./.github/workflows/, covering path normalization.

@copilot please address the review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~6 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again

require.NotContains(t, string(lockContent), `GH_AW_ACTION_FAILURE_ISSUE_EXPIRES_HOURS: "168"`)

// An explicit default directory must compile identically to the implicit one.
for _, explicitDir := range []string{".github/workflows", "./.github/workflows/"} {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[/tdd] This loop only asserts expiry reconciliation, but the PR's behavior note says explicit --dir .github/workflows now also generates maintenance workflows. That change has no test. Asserting agentics-maintenance.yml does not work here, because the implicit compile does not produce it in this fixture either.

💡 Suggested test

Compare the full set of generated files between the implicit compile and each explicit-dir compile, for example by listing workflowsDir after each run and requiring the lists to match. This checks the parity claim directly without depending on which trigger generates the maintenance file.

@copilot please address this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Added a generated-file-set parity assertion for the implicit and both explicit default-directory compiles. The change is in commit `

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Added the generated-file-set parity assertion; commit HASH contains the change.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (pkg/cli/update_compile_test.go:98): address unresolved feedback - Review comment

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "98f904d3ba3fd5cfff81c7d5b2263b9369355cae",
  "kind": "requested",
  "schema_version": "1",
  "state": "f8bfa89e08d5a6ab3599dbb598f18373d562be3f247ad749a3c07196796b57a4",
  "work": [
    "d2dbb1d6b5c467958a4286bf4eeb0c970250fc8642b5b7a4801754db52532f04"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 7K · ◷
Comment /souschef to run again

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Category: bug
Risk: medium
Total score: 54/100
Score breakdown: impact 29 + urgency 16 + quality 9 = 54
Recommended action: batch_review
Batch: none

Generated by 🔧 PR Triage Agent · copilot · mai11 · ~6 AIC · ⌖ ~2 AIC · ⊞ 15.3K · ◷

@pelikhan
pelikhan merged commit bcfcd85 into main Nov 16, 2026
68 checks passed
@pelikhan
pelikhan deleted the pelikhan/scaling-succotash branch November 16, 2026 15:14
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants