-
Notifications
You must be signed in to change notification settings - Fork 0
Mark loop bootstrap merged and guard main memory #24
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
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2c8ba57
Mark loop bootstrap merged and guard main memory
Abiorh001 6271178
Add post-merge loop review evidence
Abiorh001 f4fe5f3
Clarify post-merge work queue wording
Abiorh001 b551de5
Refresh post-merge loop review evidence
Abiorh001 c6d1790
Clarify post-review evidence scope
Abiorh001 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
57 changes: 57 additions & 0 deletions
57
...bootstrap/reviews/WS-ENG-001-post-merge-loop-memory-internal-review-evidence.md
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,57 @@ | ||
| # Internal Review Evidence: WS-ENG-001 Post-Merge Loop Memory | ||
|
|
||
| ## Chunk | ||
|
|
||
| WS-ENG-001-01 | ||
|
|
||
| open sub-agent sessions: none | ||
|
|
||
| valid findings addressed: yes | ||
|
|
||
| ## Reviewed Revision | ||
|
|
||
| Reviewed code SHA: f4fe5f3c4fbdd626bbc6d3f837aeca1cceb6e9ca | ||
|
|
||
| Reviewed at: 2026-06-20T13:15:54Z | ||
|
|
||
| Reviewer run IDs: 019ee4bd-d3d5-7830-b042-a46397b2a4f3, 019ee4be-9fd5-78d2-801a-8ccb7541ad19, 019ee4c0-e266-71e3-b65e-3f1afa8af74c, 019ee4c3-8994-7a50-9bb9-49962001a247, 019ee4dd-f49e-72d2-abd4-6391aafe95d3, 019ee4fe-9b01-7741-a130-a4a78f2054b0, 019ee500-050e-7702-99df-a38a87435281, 019ee502-a260-7e01-affe-77867dd21325, 019ee504-e427-76c1-a66f-3fc036207abe | ||
|
|
||
| After reviewed SHA `f4fe5f3c4fbdd626bbc6d3f837aeca1cceb6e9ca`, the only committed path changed in this PR is this internal review evidence file. No implementation, workflow, test, policy, or loop-memory state file changed after that reviewed SHA. | ||
|
|
||
| ## Reviewer Results | ||
|
|
||
| | Reviewer | Result | Blocking findings | Notes | | ||
| |---|---:|---|---| | ||
| | senior engineering | PASS WITH LOW RISKS | None remaining | Confirmed merged-loop memory is no longer stale, the guard is post-merge scoped, and `workflow_dispatch` is low risk because it does not run on PR events. | | ||
| | qa/test | PASS | None | Confirmed loop-memory tests use fixtures instead of live checkout state, so valid PR pre-merge memory is not blocked. | | ||
| | security/auth | PASS WITH LOW RISKS | None remaining | Confirmed this change touches engineering-loop state and CI only; no Workstream auth, session, token, product runtime, or permission behavior changed. | | ||
| | product/ops | PASS WITH LOW RISKS | None remaining | Confirmed post-merge state now says no active chunk, no active PR gate, and future work must start from an approved intent/plan/chunk contract. Low-risk stale wording in `WORK_QUEUE.md` was fixed. | | ||
| | architecture | PASS | None | Confirmed the change stays in the Codex engineering loop and does not turn loop state into Workstream product functionality. | | ||
| | docs | PASS | None | Confirmed status wording distinguishes merged state, inactive queue state, and external review response logging. | | ||
| | ci integrity | PASS AFTER FIXES | None remaining | Confirmed the new main-only loop-memory workflow uses pinned checkout, disabled credential persistence, and a deterministic Python guard. | | ||
| | reuse/dedup | PASS | None | Confirmed the guard reuses existing loop files and does not introduce another competing source of truth. | | ||
| | test delta | PASS AFTER FIXES | None remaining | Confirmed `scripts/test_agent_gates.py` covers stale pre-merge memory rejection and merged-state acceptance with temporary fixtures. | | ||
|
|
||
| ## Valid Findings Addressed | ||
|
|
||
| - Local Workstream directory confusion: identified `/home/abiorh/flow/workstream` as a separate dirty feature branch, not `main`, and left unrelated checker/test changes untouched. | ||
| - Stale merged-loop memory: updated `.agent-loop/LOOP_STATE.md`, initiative `STATUS.md`, `WORK_QUEUE.md`, and `REVIEW_LOG.md` to reflect that PR #23 is merged. | ||
| - Missing main enforcement: added the verified workflow path `.github/workflows/loop-memory.yml` so merged loop memory is checked on pushes to `main`. | ||
| - Over-broad local-state test risk: changed loop-memory regression tests to use fixture files instead of the live repository state. | ||
| - Missing internal evidence for this process change: added this separate internal-review evidence file for PR #24. | ||
| - Stale post-merge wording: changed `After this bootstrap lands` to `After this bootstrap has landed` in `.agent-loop/WORK_QUEUE.md`. | ||
|
|
||
| ## Commands Run | ||
|
|
||
| ```bash | ||
| python3 scripts/check_loop_memory_state.py | ||
| python3 scripts/test_agent_gates.py | ||
| python3 scripts/check_markdown_links.py | ||
| python3 scripts/check_stale_workstream_wording.py | ||
| python3 -m py_compile scripts/check_loop_memory_state.py scripts/test_agent_gates.py | ||
| git diff --check HEAD~1..HEAD | ||
| ``` | ||
|
|
||
| ## Remaining Risks | ||
|
|
||
| - `/home/abiorh/flow/workstream` remains dirty on `codex/submission-artifact-policy-docs` with unrelated checker/revision testing changes. Those changes were not modified here because they are outside PR #24. |
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,22 @@ | ||
| name: Loop Memory | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| loop-memory: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Loop memory state check | ||
| run: python3 scripts/check_loop_memory_state.py |
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,79 @@ | ||
| """Validate merged loop memory is not left in a pre-merge state.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| import re | ||
| import sys | ||
| from pathlib import Path | ||
|
|
||
|
|
||
| ROOT = Path(__file__).resolve().parents[1] | ||
| CHECKED_FILES = ( | ||
| ".agent-loop/LOOP_STATE.md", | ||
| ".agent-loop/WORK_QUEUE.md", | ||
| ".agent-loop/REVIEW_LOG.md", | ||
| ) | ||
| INITIATIVE_STATUS_FILES = tuple( | ||
| str(path.relative_to(ROOT)) | ||
| for path in (ROOT / ".agent-loop/initiatives").glob("*/STATUS.md") | ||
| ) | ||
| FORBIDDEN_PATTERNS = ( | ||
| (re.compile(r"PR #\d+ open", re.IGNORECASE), "merged main cannot list an open PR"), | ||
| ( | ||
| re.compile(r"awaiting human merge decision", re.IGNORECASE), | ||
| "merged main cannot await a merge decision", | ||
| ), | ||
| ( | ||
| re.compile(r"human merge checkpoint", re.IGNORECASE), | ||
| "merged main cannot remain at the human merge checkpoint", | ||
| ), | ||
| ( | ||
| re.compile(r"CI ready for final rerun", re.IGNORECASE), | ||
| "merged main cannot wait for final CI rerun", | ||
| ), | ||
| ( | ||
| re.compile(r"Push the reviewed revision", re.IGNORECASE), | ||
| "merged main cannot instruct pushing reviewed revision", | ||
| ), | ||
| ( | ||
| re.compile(r"CodeRabbit, then stop for the user-owned merge decision", re.IGNORECASE), | ||
| "merged main cannot wait for external review before merge", | ||
| ), | ||
| ( | ||
| re.compile(r"\|\s*`[^`]+`\s*\|[^|]+\|[^|]+\|\s*In progress\s*\|", re.IGNORECASE), | ||
| "merged main cannot keep a completed chunk in active In progress state", | ||
| ), | ||
| ) | ||
|
|
||
|
|
||
| def checked_paths() -> list[Path]: | ||
| """Return loop memory paths that must not contain pre-merge state.""" | ||
| paths = [ROOT / path for path in CHECKED_FILES] | ||
| paths.extend(ROOT / path for path in INITIATIVE_STATUS_FILES) | ||
| return paths | ||
|
|
||
|
|
||
| def main() -> int: | ||
| """Fail when loop memory on main still describes a pre-merge checkpoint.""" | ||
| failures: list[str] = [] | ||
| for path in checked_paths(): | ||
| if not path.exists(): | ||
| failures.append(f"{path.relative_to(ROOT)}: missing loop memory file") | ||
| continue | ||
| text = path.read_text(encoding="utf-8") | ||
| for pattern, message in FORBIDDEN_PATTERNS: | ||
| if pattern.search(text): | ||
| failures.append(f"{path.relative_to(ROOT)}: {message}") | ||
|
|
||
| if failures: | ||
| print("Loop memory state is stale:", file=sys.stderr) | ||
| for failure in failures: | ||
| print(f"- {failure}", file=sys.stderr) | ||
| return 1 | ||
|
|
||
| print("Loop memory state check passed.") | ||
| return 0 | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| raise SystemExit(main()) | ||
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.
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.
Detect missing initiative
STATUS.mdfiles explicitlyLine 16–19 only captures existing
*/STATUS.mdfiles, so an initiative folder missingSTATUS.mdis silently skipped and never fails validation. That leaves a contract hole in loop-memory integrity checks.Proposed fix
Also applies to: 49-53, 59-67
🤖 Prompt for AI Agents