Skip to content

Keep precommit diagnostics non-mutating and diff-scoped - #20

Closed
sametaln wants to merge 1 commit into
negoro26:mainfrom
sametaln:fix/diff-scoped-precommit-20261017
Closed

sametaln wants to merge 1 commit into
negoro26:mainfrom
sametaln:fix/diff-scoped-precommit-20261017

Conversation

@sametaln

Copy link
Copy Markdown

Why

The deslop translations recommend omp cleanse --all as diagnostics over a diff. The CLI describes a detect-and-fix operation. Running the recommendation spawned repository-wide fixers and changed unrelated files.

Scope

  • Replace the unsafe recommendation in omp-port/rules.sed with unslop and non-mutating repository diagnostics scoped to the diff.
  • Keep the generic deslop alias limited to the existing unslop skill.
  • Reject the unsafe command through the existing runtime contract table.
  • Add an isolated mutation that inserts the command into a fixture and requires the real gate to reject it.
  • Regenerate the five affected Markdown files through the existing generator.

Tradeoffs

The guidance leaves each repository to select its existing diagnostic commands. It invents no CLI flag or replacement tool. The runtime contract disallows this unscoped cleanup recommendation in generated skills and agents.

Blast radius

Three port source files and five generated Markdown files change. The cleanup CLI itself and the operator's installed plugin do not change. The upstream pin remains e5136d8.

Verification

  • bash omp-port/sync-upstream.sh rebuild completed with isolated GNU prerequisites.
  • bash omp-port/check-port.sh passed, including reproducibility at the pinned source.
  • bash omp-port/test-gate-mutations.sh passed. The unscoped cleanup mutation was rejected by the real fixture gate.
  • An independent source review found no evidence-backed defects.

An earlier local gate used BSD awk and emitted an interpreter error despite exiting zero. That run was discarded. The reported full pass used GNU awk and completed without that error.

@AlexNegrescu26

Copy link
Copy Markdown
Collaborator

The rules and gate check from this PR are in #25: the three rules, the runtime unscoped-cleanup contract check and the isolated mutation, rebuilt at 4ec7ffa rather than taking the generated files. One change: I dropped the trailing backslash-dot on the 'Run /deslop before commit' rule because upstream continues the sentence, so it never matched. Closing as taken. Thank you.

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