-
Notifications
You must be signed in to change notification settings - Fork 44
feat(methodology): pre-stall reviewer awareness + re-acceptance signals (4 commits) #145
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
Open
Leopold-Fitz-AI
wants to merge
4
commits into
PolyArch:main
Choose a base branch
from
Leopold-Fitz-AI:feat/methodology-pre-stall-and-re-acceptance-signals
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
19217ba
feat(finalize): require Outcome classification line in finalize summary
Leopold-Fitz-AI 2d15298
feat(reviewer-prompt): inject session_invariants block to route locke…
Leopold-Fitz-AI 1d4b170
feat(setup): detect inherited-delta sessions and auto-generate sessio…
Leopold-Fitz-AI 7c42127
feat(summary-schema): add Blocked By Methodology Invariant block + re…
Leopold-Fitz-AI 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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| #!/usr/bin/env bash | ||
| # | ||
| # Test that the implementer prompt documents the optional | ||
| # Blocked By Methodology Invariant block, and the reviewer prompt | ||
| # documents how to recognise + route it. | ||
| # | ||
| # Positive Test Cases: | ||
| # - T-POS-1: next-round prompt documents the optional block + format | ||
| # - T-POS-2: next-round prompt lists the four required block fields | ||
| # - T-POS-3: next-round prompt warns against using block for ordinary follow-up | ||
| # - T-POS-4: regular-review prompt instructs reviewer to recognise the block | ||
| # - T-POS-5: regular-review prompt instructs reviewer to verify-then-route | ||
| # - T-POS-6: regular-review prompt instructs reviewer to push back on misuse | ||
| # | ||
|
|
||
| set -uo pipefail | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" | ||
|
|
||
| GREEN='\033[0;32m' | ||
| RED='\033[0;31m' | ||
| NC='\033[0m' | ||
| TESTS_PASSED=0 | ||
| TESTS_FAILED=0 | ||
|
|
||
| pass() { echo -e "${GREEN}PASS${NC}: $1"; TESTS_PASSED=$((TESTS_PASSED + 1)); } | ||
| fail() { echo -e "${RED}FAIL${NC}: $1"; echo " $2"; TESTS_FAILED=$((TESTS_FAILED + 1)); } | ||
|
|
||
| NEXT_ROUND="$PROJECT_ROOT/prompt-template/claude/next-round-prompt.md" | ||
| REGULAR="$PROJECT_ROOT/prompt-template/codex/regular-review.md" | ||
|
|
||
| # T-POS-1: next-round prompt documents the optional block | ||
| if grep -qF "## Blocked By Methodology Invariant" "$NEXT_ROUND"; then | ||
| pass "T-POS-1: next-round prompt names the optional block" | ||
| else | ||
| fail "T-POS-1: next-round prompt missing block name" "expected literal '## Blocked By Methodology Invariant' heading" | ||
| fi | ||
|
|
||
| # T-POS-2: four required block fields | ||
| for field in "Invariant:" "Findings blocked:" "Canonical resolution:" "Why I cannot act in-loop:"; do | ||
| if grep -qF "$field" "$NEXT_ROUND"; then | ||
| pass "T-POS-2: block field documented: $field" | ||
| else | ||
| fail "T-POS-2: block field missing: $field" "expected literal '$field' in template" | ||
| fi | ||
| done | ||
|
|
||
| # T-POS-3: misuse warning | ||
| if grep -qiE "use this block conservatively|NOT a way to defer|conservatively" "$NEXT_ROUND"; then | ||
| pass "T-POS-3: next-round warns against block misuse" | ||
| else | ||
| fail "T-POS-3: misuse warning missing" "expected language warning the implementer not to abuse the block" | ||
| fi | ||
|
|
||
| # T-POS-4: reviewer recognises the block | ||
| if grep -qF "## Blocked By Methodology Invariant" "$REGULAR"; then | ||
| pass "T-POS-4: regular-review references the block" | ||
| else | ||
| fail "T-POS-4: regular-review missing block reference" "expected '## Blocked By Methodology Invariant' in template" | ||
| fi | ||
|
|
||
| # T-POS-5: reviewer verify-then-route language | ||
| if grep -qiE "verify the implementer.s claim|confirm the listed findings" "$REGULAR"; then | ||
| pass "T-POS-5: reviewer instructed to verify-then-route" | ||
| else | ||
| fail "T-POS-5: verify-then-route guidance missing" "expected verification step in reviewer prompt" | ||
| fi | ||
|
|
||
| # T-POS-6: push back on misuse | ||
| if grep -qiE "push back|wrongly classified|leave them in" "$REGULAR"; then | ||
| pass "T-POS-6: reviewer instructed to push back on misuse" | ||
| else | ||
| fail "T-POS-6: push-back guidance missing" "expected explicit push-back language for false-blocked findings" | ||
| fi | ||
|
|
||
| echo "" | ||
| echo "Total: $TESTS_PASSED passed, $TESTS_FAILED failed" | ||
| [[ "$TESTS_FAILED" -eq 0 ]] || exit 1 | ||
| exit 0 |
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.
Set
INHERITED_DELTAusing more thanPRIOR_BASE_COMMIT != BASE_COMMIT: both values are base-branch SHAs captured at session start, so this misses the common case where new commits were added on the working branch between sessions while the base branch did not move. In that scenario the comparison stays equal,inherited_deltais incorrectly leftfalse, andsession-lineage.mdis never generated even though the new session is actually re-accepting inherited work.Useful? React with 👍 / 👎.