a06f331eb8
CI / benchmark (push) Has been skipped
install-script / posix-syntax (push) Successful in 6m1s
CI / build-onnx (push) Failing after 6m43s
init-smoke / dry-run (push) Failing after 15m57s
security / govulncheck (push) Has been cancelled
security / trivy-fs (push) Has been cancelled
CI / test (1.26, ubuntu-latest) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
CI / test (1.26, macos-latest) (push) Has been cancelled
CI / build-windows (push) Has been cancelled
CI / lint (push) Has been cancelled
install-script / powershell-syntax (push) Has been cancelled
install-script / install (macos-14) (push) Has been cancelled
install-script / install (ubuntu-latest) (push) Has been cancelled
103 lines
3.4 KiB
Django/Jinja
103 lines
3.4 KiB
Django/Jinja
Please solve this issue: {{task}}
|
|
|
|
You can execute bash commands and edit files to implement the necessary changes.
|
|
|
|
## Recommended Workflow
|
|
|
|
Work step-by-step so you can iterate on your changes and catch problems early.
|
|
|
|
1. **Understand the issue** — read the problem statement, identify the symptom and affected area
|
|
2. **Find the relevant code** — use `gortex-search "<concept>"` to find symbols, or `grep` for specific strings
|
|
3. **Understand the suspect** — use `gortex-context "<task description>"` to get full context with callers, callees, and execution flows
|
|
4. **Check blast radius** — before editing shared code, run `gortex-impact "<symbol_id>"` to see what depends on it
|
|
5. **Implement the fix** — make minimal, targeted changes
|
|
6. **Verify** — run relevant tests, check edge cases
|
|
7. **Submit** — issue: `echo COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT`
|
|
Do not combine it with any other command. After this command, you cannot continue working on this task.
|
|
|
|
## Debugging Patterns
|
|
|
|
| Symptom | Approach |
|
|
|---------|----------|
|
|
| Error message / exception | `gortex-search` for error text → `gortex-context` on the affected area |
|
|
| Wrong return value | `gortex-context` on the function → trace callees for data flow |
|
|
| Missing feature / incomplete behavior | `gortex-search` for feature area → `gortex-context` to find the gap |
|
|
| Need to understand callers | `gortex-usages` — graph-complete, finds callers grep would miss |
|
|
|
|
## Risk Assessment
|
|
|
|
Before editing shared code, check the blast radius with `gortex-impact`:
|
|
|
|
| Impact | Risk | Action |
|
|
|--------|------|--------|
|
|
| <5 symbols at d=1 | Low | Fix with confidence |
|
|
| 5-15 symbols at d=1 | Medium | Fix carefully, run broader tests |
|
|
| >15 symbols at d=1 | High | Minimal change, run full test suite |
|
|
|
|
## Important Rules
|
|
|
|
1. Every response must contain exactly one action
|
|
2. The action must be enclosed in triple backticks
|
|
3. Directory or environment variable changes are not persistent. Every action is executed in a new subshell.
|
|
However, you can prefix any action with `MY_ENV_VAR=MY_VALUE cd /path/to/working/dir && ...` or write/load environment variables from files
|
|
4. Make minimal, targeted changes. Don't refactor unrelated code.
|
|
5. Gortex tools are ~100ms. Use them when they save you multiple grep iterations.
|
|
|
|
<system_info>
|
|
{{system}} {{release}} {{version}} {{machine}}
|
|
</system_info>
|
|
|
|
## Formatting your response
|
|
|
|
Here is an example of a correct response:
|
|
|
|
<example_response>
|
|
THOUGHT: The issue mentions a problem with form field validation. Let me search the code knowledge graph for relevant symbols to understand how validation works in this codebase.
|
|
|
|
```mswea_bash_command
|
|
gortex-search "form field validation"
|
|
```
|
|
</example_response>
|
|
|
|
## Useful command examples
|
|
|
|
### Create a new file:
|
|
|
|
```bash
|
|
cat <<'EOF' > newfile.py
|
|
import numpy as np
|
|
hello = "world"
|
|
print(hello)
|
|
EOF
|
|
```
|
|
|
|
### Edit files with sed:
|
|
|
|
{%- if system == "Darwin" -%}
|
|
<note>
|
|
You are on MacOS. For all the below examples, you need to use `sed -i ''` instead of `sed -i`.
|
|
</note>
|
|
{%- endif -%}
|
|
|
|
```bash
|
|
# Replace all occurrences
|
|
sed -i 's/old_string/new_string/g' filename.py
|
|
# Replace only first occurrence
|
|
sed -i 's/old_string/new_string/' filename.py
|
|
# Replace all occurrences in lines 1-10
|
|
sed -i '1,10s/old_string/new_string/g' filename.py
|
|
```
|
|
|
|
### View file content:
|
|
|
|
```bash
|
|
# View specific lines with numbers
|
|
nl -ba filename.py | sed -n '10,20p'
|
|
```
|
|
|
|
### Any other command you want to run
|
|
|
|
```bash
|
|
anything
|
|
```
|