Repository navigation
Delta debug prune #9749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
maliberty
merged 4 commits into
The-OpenROAD-Project:master
from
Pinata-Consulting:delta-debug-prune
Mar 17, 2026
Merged
Delta debug prune #9749
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
acd2f2e
retire deltaDebug.py in favor of whittle.py
oharboe 3c82413
add progress monitoring to whittle.py
oharboe a967f32
document whittle.py progress monitoring and Claude workflow
oharboe 30f5080
add /triage-issue Claude skill for bug minimization
oharboe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| --- | ||
| name: triage-issue | ||
| description: > | ||
| Triage an OpenROAD GitHub issue by reproducing the bug and | ||
| minimizing the test case with whittle.py. Use when an issue | ||
| has an attached tarball artifact (.tar.gz) from `make *_issue`. | ||
| argument-hint: <issue-number> | ||
| --- | ||
|
|
||
| # Triage OpenROAD Issue | ||
|
|
||
| You are triaging OpenROAD issue **$ARGUMENTS**. | ||
|
|
||
| ## 1. Fetch issue details | ||
|
|
||
| ```bash | ||
| gh issue view $ARGUMENTS --repo The-OpenROAD-Project/OpenROAD \ | ||
| --json title,body,labels,state,comments | ||
| ``` | ||
|
|
||
| Look for: | ||
| - Error string (e.g. `GPL-0305`, `GPL-0307`, `DRT-XXXX`) | ||
| - Attached tarball URL (from `make *_issue`) | ||
| - OpenROAD version the bug was reported against | ||
|
|
||
| ## 2. Download and extract artifact | ||
|
|
||
| Download any `.tar.gz` attached to the issue body or comments. | ||
| Extract into a working directory: | ||
|
|
||
| ```bash | ||
| mkdir -p /tmp/triage-$ARGUMENTS | ||
| cd /tmp/triage-$ARGUMENTS | ||
| tar xzf <downloaded-tarball> | ||
| cd <extracted-dir> | ||
| ``` | ||
|
|
||
| ## 3. Fix the run script | ||
|
|
||
| The `run-me-*.sh` scripts from `make *_issue` often need two fixes: | ||
|
|
||
| ```bash | ||
| # Add set -e to exit on error | ||
| sed -i '2i set -e' run-me-*.sh | ||
|
|
||
| # Add -exit so openroad exits after the tcl script | ||
| sed -i 's/openroad -no_init/openroad -exit -no_init/g' run-me-*.sh | ||
| sed -i 's/openroad -no_splash/openroad -exit -no_splash/g' run-me-*.sh | ||
| ``` | ||
|
|
||
| ## 4. Build OpenROAD | ||
|
|
||
| Build from the OpenROAD source tree: | ||
|
|
||
| ```bash | ||
| cd <path-to>/OpenROAD | ||
| bazelisk build :openroad | ||
| ``` | ||
|
|
||
| The binary is at `bazel-bin/openroad`. Export it: | ||
|
|
||
| ```bash | ||
| export OPENROAD_EXE=$(pwd)/bazel-bin/openroad | ||
| ``` | ||
|
|
||
| ## 5. Reproduce the bug | ||
|
|
||
| Run the step command and confirm the error string appears: | ||
|
|
||
| ```bash | ||
| cd /tmp/triage-$ARGUMENTS/<extracted-dir> | ||
| ./run-me-*.sh 2>&1 | tee reproduce.log | ||
| grep -c "<error-string>" reproduce.log | ||
| ``` | ||
|
|
||
| If the bug does NOT reproduce with the latest OpenROAD, report this | ||
| on the issue -- the bug may have been fixed. | ||
|
|
||
| ## 6. Run whittle.py | ||
|
|
||
| ```bash | ||
| python3 <path-to>/OpenROAD/etc/whittle.py \ | ||
| --error_string "<error-string>" \ | ||
| --base_db_path <path-to>.odb \ | ||
| --use_stdout --exit_early_on_error \ | ||
| --step "./run-me-*.sh" \ | ||
| --persistence 3 --multiplier 2 | ||
| ``` | ||
|
|
||
| ### Monitoring progress | ||
|
|
||
| Watch the `[whittle]` lines. Key things to check: | ||
|
|
||
| - **ETA growing?** The design may be too large for the current | ||
| persistence level. Try `--persistence 1` for a coarse first pass. | ||
| - **.odb size not shrinking?** The error may depend on most of the | ||
| design. Try increasing `--multiplier`. | ||
| - **Step timeout too long?** Use `--timeout 300` to cap each step | ||
| at 5 minutes. | ||
| - **After 5 minutes** of a step, whittle.py shows the tail of the | ||
| step's log so you can see what it is doing. | ||
|
|
||
| ### When to abort | ||
|
|
||
| - If after 20+ steps the .odb size has not changed, abort and try | ||
| different parameters. | ||
| - If the step itself takes >10 minutes, consider whether the error | ||
| string is specific enough (avoid generic strings like "ERROR"). | ||
|
|
||
| ## 7. Upload results | ||
|
|
||
| Create a new tarball with the whittled .odb: | ||
|
|
||
| ```bash | ||
| cp whittle_base_result_*.odb <original-odb-path> | ||
| tar czf whittled-$ARGUMENTS.tar.gz <extracted-dir>/ | ||
| ``` | ||
|
|
||
| Comment on the issue with before/after stats: | ||
|
|
||
| ```bash | ||
| gh issue comment $ARGUMENTS --repo The-OpenROAD-Project/OpenROAD \ | ||
| --body "Whittled test case: original NNN insts -> MMM insts, \ | ||
| .odb size: XXX MB -> YYY MB. Attached whittled tarball." | ||
| ``` | ||
|
|
||
| Upload the tarball to the issue comment via the GitHub web UI | ||
| (gh CLI does not support file attachments on comments). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For conciseness and robustness, you can combine the two
sedcommands into a single one using a regular expression to match either-no_initor-no_splash.