Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/daily-agent-of-the-day-blog-writer.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .github/workflows/daily-agent-of-the-day-blog-writer.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ tools:
- "wc *"
- "expr *"
- "git status"
- "cd * && git status"
- "git add *"
- "git add * && git commit *"
- "cd * && git checkout -b * && git add * && git commit *"
Comment on lines +48 to +50
- "git diff -- docs/src/content/docs/**"
github:
mode: gh-proxy
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/layout-spec-maintainer.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .github/workflows/layout-spec-maintainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ tools:
- grep -r ".*" pkg/workflow/js/
- grep -r ".*" pkg/workflow/*.go
- git status
- cd * && git status
- cd * && git checkout -b *
- git -C * checkout -b *
- cd * && git add * && git diff --cached --stat
- cd * && git add * && git status
- git diff scratchpad/layout.md
- cat scratchpad/layout.md
cli-proxy: true
Expand Down
51 changes: 51 additions & 0 deletions pkg/workflow/prompts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,57 @@ func TestLayoutSpecMaintainerHasToolBudgetAwareness(t *testing.T) {
}
}

func TestDailyAgentOfTheDayBlogWriterHasGitDenialMitigationAllowlist(t *testing.T) {
repoRoot, err := findRepoRoot()
if err != nil {
t.Fatalf("Failed to find repo root: %v", err)
}

workflowFile := filepath.Join(repoRoot, ".github", "workflows", "daily-agent-of-the-day-blog-writer.md")
content, err := os.ReadFile(workflowFile)
if err != nil {
t.Fatalf("Failed to read workflow file: %v", err)
}

workflow := string(content)
for _, expected := range []string{
` - "cd * && git status"`,
` - "git add *"`,
` - "git add * && git commit *"`,
` - "cd * && git checkout -b * && git add * && git commit *"`,
Comment on lines +437 to +439
} {
if !strings.Contains(workflow, expected) {
t.Fatalf("Expected Daily Agent of the Day Blog Writer workflow to contain %q", expected)
}
}
}

func TestLayoutSpecMaintainerHasGitDenialMitigationAllowlist(t *testing.T) {
repoRoot, err := findRepoRoot()
if err != nil {
t.Fatalf("Failed to find repo root: %v", err)
}

workflowFile := filepath.Join(repoRoot, ".github", "workflows", "layout-spec-maintainer.md")
content, err := os.ReadFile(workflowFile)
if err != nil {
t.Fatalf("Failed to read workflow file: %v", err)
}

workflow := string(content)
for _, expected := range []string{
" - cd * && git status",
" - cd * && git checkout -b *",
" - git -C * checkout -b *",
" - cd * && git add * && git diff --cached --stat",
" - cd * && git add * && git status",
} {
if !strings.Contains(workflow, expected) {
t.Fatalf("Expected Layout Specification Maintainer workflow to contain %q", expected)
}
}
}

func TestDailySPDDSpecPlannerAllowsReadOnlyFileInspection(t *testing.T) {
repoRoot, err := findRepoRoot()
if err != nil {
Expand Down