Repository navigation
NRA replaces the debt ratchet: delete refactor-audit submodule, pinned_audit and ratchet entry points - #3634
Merged
Merged
Conversation
…d_audit and ratchet entries
agent-comms measured itself with refactor-audit, vendored as a git submodule under
src/agent_comms/skills/refactor-audit and loaded by sys.path surgery in
agent_comms.pinned_audit. NominalRefactorAdvisor now owns that audit package
(nominal_refactor_advisor.audit, comparison in audit.gate), so agent-comms imports it
as an ordinary runtime dependency and the submodule, its loader and every
"ratchet" entry point are deleted.
- .gitmodules, the submodule gitlink and src/agent_comms/pinned_audit.py: deleted.
- tools/agent_comms_project.py: PinnedAudit and AUDIT deleted; RevisionReader places
only the revision's reader, which imports the installed NRA audit.
- phase_evidence.AuditPatternPresent counts in the installed NRA audit package;
the now-unused MainTree.pinned is deleted.
- Slop.catalog() reads nominal_refactor_advisor.audit/patterns; the session hook and
unit instructions read it through that one owner.
- tools/debt_ratchet.py -> tools/nra_gate.py, tools/client_ratchet.py ->
tools/nra_client_gate.py, debt-ratchet{,-cache}.yml -> nra-gate{,-cache}.yml;
check names debt-src/debt-tools kept for the merge-queue ruleset.
- nominal-refactor-advisor moves from the dev extra to runtime dependencies,
pinned to feat/absorb-refactor-audit until that branch merges; uv.lock and
stack/uv.lock relocked (native pin unchanged).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnH6dS2Kmg1WxNnAc78YHA
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
skill.py: keep main's paper1-first deal order and this branch's NRA catalog index wording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dS2Kmg1WxNnAc78YHA
NRA #155 deletes the audit's ParsedModule(path, text, tree, name); both users build ast_tools.ParsedModule and read .module/.file_path/.source. MainTree.module() goes through modules(), so one construction site parses and caches every blob. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dS2Kmg1WxNnAc78YHA
nominal-refactor-advisor c17cb4ab -> b542c5a2 (main with nominal_refactor_advisor.audit), tree-sitter 0.25.2 -> 0.26.0, in uv.lock and stack/uv.lock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dS2Kmg1WxNnAc78YHA
Dropping submodules: recursive left four actions/checkout steps with a bare with:, which GitHub rejects as an invalid workflow, so neither ci.yml nor nra-gate.yml ran on this PR at any head. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dS2Kmg1WxNnAc78YHA
|
debt-tools at eb54778, every finding: |
trissim
enabled auto-merge
October 30, 2026 05:07
… by type Under pinned_audit the audit module was Any to mypy, so StoredFormat.declared took a JsonValue version and dict[str, JsonValue] fields unchecked; NRA's typed package shows the 4 errors. The match is the decoder of that JSON, so its patterns narrow: int() version, list() required filtered to str keys, fields as dict[object, object]. Import blocks that swapped pinned_audit for nominal_refactor_advisor are sorted (I001). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnH6dS2Kmg1WxNnAc78YHA
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
1 commit, 42 files, +168/-231. Deleted: the refactor-audit submodule (
.gitmodules, gitlink),src/agent_comms/pinned_audit.py(22 lines),PinnedAudit(15 lines),MainTree.pinned,tools/debt_ratchet.pyandtools/client_ratchet.py. Every "ratchet" entry point in agent-comms is gone. The audit is now NominalRefactorAdvisor's package,nominal_refactor_advisor.audit, and its comparison isaudit.gate.Paired NRA branch:
feat/absorb-refactor-audit(fork A) moves refactor-audit'sscripts/auditandreferences/patternsinto NRA. This PR can't go green until that branch holdsnominal_refactor_advisor.audit. The lock currently resolves the branch to c17cb4ab, which is NRA main.Consumers, before → after
phase_evidence.pyfrom agent_comms.pinned_audit import SKILL, ForeignAbsenceProbe, GodFunction, ParsedModule, auditfrom nominal_refactor_advisor import audit+audit.findings/audit.source_measuresnamesAuditPatternPresentMainTree.pinned)nominal_refactor_advisor.auditsources;MainTree.pinneddeleted (no other caller)Slop.catalog()(hook, unit instructions)files(skills)/refactor-audit/references/patternsfiles("nominal_refactor_advisor.audit")/patternstools/agent_comms_project.pyPinnedAuditextracts the pinned submodule into every revision treetools/stored_formats.py,repairs.py,module_layers.pyagent_comms.pinned_audit.audit,audit.ratchet.*nominal_refactor_advisor.audit,audit.gate.*guards/test_agent_comms_gate.pyrenamed,store_lock_graph,boundary_decoding,carry,phase_evidence)pinned_auditdebt-ratchet.yml,debt-ratchet-cache.yml,pip install -e src/agent_comms/skills/refactor-audit,submodules: recursivenra-gate.yml,nra-gate-cache.yml; installs drop the submodule; jobnra-gatekeeps check namesdebt-src/debt-toolsfor the merge-queue rulesetDependency
nominal-refactor-advisormoves from thedevextra to runtimedependencies, becausephase_evidenceandsloprun in the installed runtime and the wheel no longer carries the audit. It sits beside the existingmetaclass-registry @ git+...@mainruntime git dependency (allow-direct-references).uv.lockandstack/uv.lockare relocked, and stack resolves tree-sitter 0.26.0 → 0.25.2 to meet NRA'stree-sitter-python<0.26. The native pin is unchanged:NativeBuildInputs.require_pinnedpasses.Required before merge
nominal_refactor_advisor.audit(withgate,patterns/); then relock.@feat/absorb-refactor-audit→@mainin pyproject.toml once NRA merges, and relockuv.lock+stack/uv.lock..github/workflows/ci.yml:49runs.core-ratchet/tools/client_ratchet.pyfrom Core main, so it has to calltools/nra_client_gate.pythe moment this merges.Proof (no local pytest, gate or mypy run)
git grep -n "pinned_audit\|skills/refactor-audit\|debt_ratchet\|refactor-audit" -- src tools tests .github→ empty.Slop.catalog()reads 52 pattern IDs.AuditPatternPresent(^class StoreLockCalls\()→ True, and a missing class → False. The real proof is this PR's CI once fork A's branch holds the package.Not folded in: #3630 (
ClientSources/--ci-inputs). Those classes exist only on #3566, which merges first.🤖 Generated with Claude Code
https://claude.ai/code/session_01RnH6dS2Kmg1WxNnAc78YHA