Skip to content

feat(memorylint): close audit/apply loop#11

Merged
RbBtSn0w merged 7 commits into
mainfrom
rbbtsn0w/memorylint-closure-loop
May 29, 2026
Merged

feat(memorylint): close audit/apply loop#11
RbBtSn0w merged 7 commits into
mainfrom
rbbtsn0w/memorylint-closure-loop

Conversation

@RbBtSn0w
Copy link
Copy Markdown
Owner

Summary

  • add a shared MemoryLint audit/apply core plus real workspace audit, apply, and load-agents helper scripts
  • define canonical ownership, constitution handoff, and executable report/edit contracts across docs and commands
  • expand fixture and end-to-end tests to cover workspace audit, staleness checks, rollback, and structured load-agents proof

Checklist closure

  1. add canonical ownership / precedence matrix
  2. make load-agents verifiable with structured proof output
  3. define constitution handoff artifact and keep constitution writes manual
  4. unify report contract and executable scanner output
  5. align runtime metrics and documentation
  6. add end-to-end apply / rollback / staleness validation coverage
  7. move fixture scanning onto the shared audit core and reduce fixture-specific logic

Validation

  • bash memorylint/tests/test-fixture-validation.sh
  • bash memorylint/tests/test-fixture-scanner.sh
  • bash memorylint/tests/test-memorylint-regressions.sh
  • bash memorylint/tests/test-workspace-audit.sh
  • bash memorylint/tests/test-apply-workflow.sh
  • bash memorylint/tests/test-load-agents-proof.sh
  • bash tests/test-review-regressions.sh
  • bash tests/test-release-workflow.sh
  • bash superpowers-bridge/tests/test-status-sync.sh
  • ruby -e "require 'yaml'; YAML.load_file('.github/workflows/ci.yml'); YAML.load_file('.github/workflows/release-trigger.yml')"
  • git diff --check

Notes

  • local pwsh -File superpowers-bridge/tests/test-status-sync.ps1 was skipped per user instruction; rely on CI for that coverage

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 29, 2026 02:38
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces workspace-level helper scripts (audit_workspace.py, apply_report.py, and load_agents_state.py) powered by a shared core module (memorylint_core.py) to unify instruction drift detection and safe-apply workflows. It also updates the documentation, regression fixtures, and test suites to support the new executable report schema and canonical ownership matrix. The review feedback focuses on enhancing the portability, robustness, and performance of the Python scripts. Key recommendations include adding a --workspace CLI override to support portable execution, replacing inline __import__ calls with standard top-level imports, optimizing an $O(N^2)$ validation check to $O(N)$, handling malformed package.json files gracefully to prevent crashes, and enforcing workspace-only scope checks to mitigate directory traversal risks.

Comment thread memorylint/scripts/apply_report.py
Comment thread memorylint/scripts/apply_report.py Outdated
Comment thread memorylint/scripts/apply_report.py
Comment thread memorylint/scripts/apply_report.py
Comment thread memorylint/scripts/apply_report.py Outdated
Comment thread memorylint/scripts/memorylint_core.py
Comment thread memorylint/scripts/memorylint_core.py
Comment thread memorylint/scripts/memorylint_core.py
Comment thread memorylint/scripts/scan_fixtures.py Outdated
Comment thread memorylint/scripts/scan_fixtures.py
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR turns MemoryLint into an executable audit/apply workflow by adding a shared Python core, workspace/report helper scripts, structured load-agents proof output, and expanded contracts/docs/tests.

Changes:

  • Adds memorylint_core.py plus audit/apply/load-agents CLIs.
  • Refactors fixture scanning onto the shared audit core and updates expected findings.
  • Expands command docs, README/DESIGN, changelog, and regression tests for the new executable contracts.

Reviewed changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
memorylint/scripts/memorylint_core.py Adds shared audit/apply logic, report schema, edits, handoffs, validators.
memorylint/scripts/audit_workspace.py Adds workspace audit CLI.
memorylint/scripts/apply_report.py Adds report apply CLI with staleness checks and rollback.
memorylint/scripts/load_agents_state.py Adds structured AGENTS.md load proof CLI.
memorylint/scripts/scan_fixtures.py Refactors fixture scanner to use the shared core.
memorylint/tests/test-workspace-audit.sh Adds workspace audit end-to-end checks.
memorylint/tests/test-apply-workflow.sh Adds apply, staleness, and rollback checks.
memorylint/tests/test-load-agents-proof.sh Adds structured load-agents proof checks.
memorylint/tests/test-memorylint-regressions.sh Extends contract checks for scripts/docs/tests.
memorylint/tests/fixtures/*/expected-findings.json Updates fixture expectations for shared-core output.
memorylint/tests/fixtures/monorepo-nested/packages/frontend/package.json Adds package metadata for nested fixture coverage.
memorylint/commands/audit.md Documents executable audit/report/edit/handoff contract.
memorylint/commands/apply.md Documents apply modes, validation, rollback, and handoff protocol.
memorylint/commands/load-agents.md Documents structured before-plan proof output.
memorylint/README.md Updates user-facing MemoryLint behavior and metrics.
memorylint/DESIGN.md Updates architecture/design contract for executable workflow.
memorylint/CHANGELOG.md Records unreleased MemoryLint additions and changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread memorylint/scripts/memorylint_core.py Outdated
Comment thread memorylint/scripts/memorylint_core.py
Comment thread memorylint/scripts/apply_report.py
Comment thread memorylint/tests/test-memorylint-regressions.sh
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7856886442

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread memorylint/scripts/memorylint_core.py Outdated
Comment thread memorylint/scripts/memorylint_core.py Outdated
Comment thread memorylint/scripts/apply_report.py
Comment thread memorylint/scripts/apply_report.py Outdated
Comment thread memorylint/scripts/memorylint_core.py Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d8f7e9ef0b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread memorylint/scripts/memorylint_core.py
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b3e89da836

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread memorylint/scripts/apply_report.py
Comment thread memorylint/scripts/memorylint_core.py Outdated
Comment thread memorylint/scripts/memorylint_core.py
Comment thread memorylint/scripts/memorylint_core.py Outdated
Comment thread memorylint/scripts/memorylint_core.py
RbBtSn0w and others added 2 commits May 29, 2026 11:19
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d7e392867

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread memorylint/scripts/memorylint_core.py Outdated
Comment thread memorylint/scripts/memorylint_core.py
Comment thread memorylint/scripts/memorylint_core.py Outdated
Comment thread memorylint/scripts/memorylint_core.py Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@RbBtSn0w RbBtSn0w merged commit c026b4f into main May 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants