Skip to content

Commit 51c2927

Browse files
Merge branch 'main' into feat/uplift-application-logs-for-model-training
2 parents eaf88b0 + c68308d commit 51c2927

147 files changed

Lines changed: 7924 additions & 6040 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy-docs-and-extensions.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
paths:
88
- 'documentation/**'
99

10+
# Use same concurrency group as PR preview workflow to prevent race conditions
11+
# when both workflows try to modify gh-pages branch simultaneously
12+
concurrency: pr-preview
13+
1014
jobs:
1115
deploy:
1216
runs-on: ubuntu-latest
@@ -40,10 +44,30 @@ jobs:
4044
npm install
4145
npm run build
4246
47+
- name: Checkout gh-pages branch
48+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
49+
continue-on-error: true # Branch may not exist on first deploy or in forks
50+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3
51+
with:
52+
ref: gh-pages
53+
path: gh-pages-current
54+
55+
- name: Preserve pr-preview directory
56+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
57+
run: |
58+
# Copy pr-preview from current gh-pages to the new build (if it exists)
59+
if [ -d "gh-pages-current/pr-preview" ]; then
60+
cp -r gh-pages-current/pr-preview documentation/build/pr-preview
61+
echo "Preserved pr-preview directory with $(ls gh-pages-current/pr-preview | wc -l) PR previews"
62+
else
63+
echo "No pr-preview directory to preserve"
64+
fi
65+
4366
- name: Deploy to /gh-pages
4467
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
4568
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # pin@v3
4669
with:
4770
github_token: ${{ secrets.GITHUB_TOKEN }}
4871
publish_dir: documentation/build
49-
keep_files: true # This preserves existing files in gh-pages branch especially for previews
72+
keep_files: false # Clean deploy - only keep what's in the build + pr-preview
73+
force_orphan: true # Create a fresh commit without history to prevent bloat

.github/workflows/goose-issue-solver.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ env:
113113
permissions:
114114
contents: write
115115
pull-requests: write
116-
issues: read
116+
issues: write
117117

118118
concurrency:
119119
group: goose-issue-${{ github.event.issue.number || github.event.inputs.issue_number }}

.github/workflows/goose-pr-reviewer.yml

Lines changed: 72 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,74 @@ env:
3939
name: todo
4040
4141
instructions: |
42-
You are a code reviewer. Your job is to evaluate code, not implement changes.
43-
44-
Principles:
45-
- Understand before you critique - explain the author's intent before finding fault
46-
- Be constructive and specific in feedback
47-
- Reference exact files and line numbers (format: path/file.rs:42)
48-
- Verify claims with code evidence before stating them
49-
- Respect project conventions (AGENTS.md)
50-
- Never modify code - this is a read-only review
51-
52-
Issue Categories & Confidence Requirements:
53-
- 🔴 BLOCKING: Must fix before merge. REQUIRES HIGH confidence with code evidence.
54-
- 🟡 WARNING: Should fix (performance, conventions, missing tests). MEDIUM+ confidence.
55-
- 🟢 SUGGESTION: Nice to have (style, refactoring). Can be speculative but label it.
42+
You are a code reviewer. Evaluate code, don't implement changes. Be constructive, specific, and verify claims with evidence.
43+
44+
## Issue Categories
45+
- 🔴 BLOCKING: Must fix. Requires HIGH confidence + code evidence.
46+
- 🟡 WARNING: Should fix. MEDIUM+ confidence.
47+
- 🟢 SUGGESTION: Nice to have. Can be speculative if labeled.
5648
- ✅ HIGHLIGHT: Good practices to acknowledge.
5749
58-
Anti-hallucination rules:
59-
- Before claiming something is "missing", search for it with rg
50+
## Core Review Lens: "Succeed Fast" Detection
51+
LLM code often compiles quickly while avoiding proper design. Ask these questions:
52+
53+
**Necessity**: Do we need this?
54+
- New function? Could an existing one take an extra parameter?
55+
- New struct? Search `rg "struct Similar"` - does one exist?
56+
- New dependency? Many tools (gh, python) are pre-installed.
57+
58+
**Types & Options**: Is the type system being used correctly?
59+
- Option<T>: Why optional? If .unwrap() is nearby, it should be required.
60+
- Option<bool>: Rarely needed. Consider if None vs Some(false) distinction matters.
61+
- Manual JSON parsing: Use typed structs, not field extraction.
62+
- Many casts/assertions: The types are probably wrong.
63+
- Use builders: Prefer `Foo::builder()` over manual struct construction when available.
64+
- Generated types: Use API/SDK-provided types. Don't redefine what's already generated.
65+
- Path types: Use PathBuf for paths, not String. Use centralized path utilities.
66+
67+
**Duplication & State**: Is there one source of truth?
68+
- Similar code nearby? Factor it out.
69+
- Shadow state (settings in multiple places)? Consolidate.
70+
- Singleton caching config? What if config changes?
71+
72+
**Error Handling**: Are errors handled or hidden?
73+
- .ok(), .unwrap_or_default(), catch-and-log: Should this propagate?
74+
75+
## Code Hygiene
76+
- AI-generated artifacts: Verbose comments like "// Helper function to..." may be LLM leftovers. Delete if obvious.
77+
- Comments restating code: Delete. "Code speaks for itself."
78+
- Comments that lie: Dangerous. Fix or delete.
79+
- TODOs without owners: Create issue or delete.
80+
- Tests setting env vars: `rg "env::set_var" -g "*test*"` = flaky tests.
81+
- Tests not testing behavior: "What bug would this catch?"
82+
Ref: https://engineering.block.xyz/blog/the-high-cost-of-free-testing
83+
84+
## Security (especially workflows)
85+
- TOCTOU: Use event payload, not API calls.
86+
- Heredoc injection: User content may contain delimiter.
87+
- Feature auto-enable: Must respect user toggles.
88+
89+
## Architectural Smell (be specific about why)
90+
- Brittle: Too many special cases, hardcoded assumptions.
91+
- Wrong layer: Routes should be thin. Clients shouldn't know implementation details.
92+
- Not independent: Multiple booleans → should be enum.
93+
- Cumbersome: Simpler approach exists? Extend existing APIs.
94+
- Naming confusion: Similar functions should return similarly-named types (not FooResult vs ResultFoo).
95+
- Scope creep: Changes unrelated to PR's stated purpose.
96+
97+
## Anti-hallucination
98+
- Search with rg before claiming something is "missing"
6099
- Before claiming UI/frontend changes are needed, trace the actual data flow
61-
- If you cannot verify a claim, say "I couldn't verify this" not "this is wrong"
100+
- Say "I couldn't verify" not "this is wrong"
62101
- 2 verified issues are better than 10 speculative ones
63102
103+
## Language Note
104+
These guidelines are primarily Rust-focused. For TypeScript/frontend changes (ui/desktop/),
105+
apply the same rigor with language-appropriate patterns (e.g., discriminated unions,
106+
optional chaining, React key uniqueness). Review all code equally thoroughly.
107+
108+
If the approach is fundamentally wrong, reject it. Don't polish bad code.
109+
64110
prompt: |
65111
Review PR #${PR_NUMBER}: ${PR_TITLE}
66112
@@ -75,6 +121,15 @@ env:
75121
76122
FIRST ACTION: Call todo_write with this entire checklist. Your memory degrades - the TODO is your only reliable memory. Update it frequently.
77123
124+
## Budget Guidance
125+
You have 15 minutes. Allocate effort wisely:
126+
- Phase 1 (Understand): ~20% - Don't over-explore, get the gist
127+
- Phase 2 (Evaluate): ~30% - This is where design issues surface
128+
- Phase 3 (Verify): ~30% - Only if approach is sound, skip if fundamentally flawed
129+
- Phase 4 (Report): ~20% - Prioritize and write concisely
130+
For large diffs (>500 lines): Focus on architecture over line-by-line review.
131+
Aim for 3-7 high-quality findings, not exhaustive coverage.
132+
78133
## PR Understanding
79134
- Intent: [fill after Phase 1]
80135
- Approach: [fill after Phase 1]

.github/workflows/pr-smoke-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ name: Live Provider Tests
1818
jobs:
1919
check-fork:
2020
runs-on: ubuntu-latest
21-
# Skip entire workflow for PRs from forks (they don't have access to secrets)
22-
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
21+
# Skip entire workflow for fork PRs and dependabot PRs (they don't have access to secrets)
22+
if: github.actor != 'dependabot[bot]' && (github.event_name == 'workflow_dispatch' || github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
2323
steps:
2424
- run: echo "Not a fork PR - proceeding with smoke tests"
2525

Cargo.lock

Lines changed: 18 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resolver = "2"
44

55
[workspace.package]
66
edition = "2021"
7-
version = "1.17.0"
7+
version = "1.19.0"
88
authors = ["Block <ai-oss-tools@block.xyz>"]
99
license = "Apache-2.0"
1010
repository = "https://github.com/block/goose"

bin/cargo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.rustup-1.25.2.pkg
1+
.rustup-1.28.2.pkg

bin/cargo-clippy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.rustup-1.25.2.pkg
1+
.rustup-1.28.2.pkg

bin/cargo-fmt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.rustup-1.25.2.pkg
1+
.rustup-1.28.2.pkg

0 commit comments

Comments
 (0)