Skip to content

fix(audit): exclude OpenClaw agent workspaces from the rule surface - #36

Merged
jaruesink merged 1 commit into
mainfrom
fix/exclude-agent-workspaces
Aug 8, 2026
Merged

fix(audit): exclude OpenClaw agent workspaces from the rule surface#36
jaruesink merged 1 commit into
mainfrom
fix/exclude-agent-workspaces

Conversation

@jaruesink

Copy link
Copy Markdown
Contributor

The last two "drifted" mirror families on saffron were forge/docs-site and openclaw-forge/docs-site. Neither is drift.

Each is an OpenClaw agent workspace whose AGENTS.md is a persona —

You are Scout, working on the Atlas project… Post all Slack notifications to #scout-updates

— sitting beside a CLAUDE.md of ai-rules coding imports. Two different kinds of file wearing the two contract names. Scored against each other they report permanent, unfixable drift, and acting on the recommendation would push an agent identity into every coding session in that directory.

Detection

A directory is a workspace when IDENTITY.md, SOUL.md, USER.md or SCRATCHPAD.md sits beside its AGENTS.md — the OpenClaw workspace file contract, not a path list, so it generalizes to any embedded workspace.

Uses lstat, not existsSync. Those markers are typically symlinks into a mounted workspace and dangle in a plain checkout:

IDENTITY.md -> ../../IDENTITY.md   (dangling)
SOUL.md     -> ../../SOUL.md       (dangling)

Every one of forge/docs-site's was dangling, so a first pass with existsSync detected none of them.

Result on saffron — Stage A closes

before today now
Mirror Duplication Rate 31% ❌ 0%
Mirror Sync Health drifted=3 ❌ drifted=0
Governance Surface
Drift Backlog 619/113 ❌ 144/23 ⚠️
Verdict CRITICAL NEEDS WORK
Structural Lint 56/100 66/100

Stages A, B and C all pass. The only remaining blocker is Stage D context-load pressure — a real finding about rule volume, not a scoring artifact.

Tests: three in rule-surface.test.ts — a persona directory is skipped, dangling-symlink markers are still detected, and an ordinary repo is untouched. Suite 382 pass, plus the 2 known npm-on-PATH failures.

The last two "drifted" mirror families on saffron were forge/docs-site and
openclaw-forge/docs-site. Neither is drift. Each is an OpenClaw agent
workspace whose AGENTS.md is a persona — "You are Scout, working on the Atlas
project", with a mission and Slack channel — sitting beside a CLAUDE.md of
ai-rules coding imports. Two different kinds of file wearing the two contract
names.

Scored against each other they report permanent, unfixable drift, and acting
on the recommendation would push an agent identity into every coding session
in that directory.

A directory is treated as a workspace when IDENTITY.md, SOUL.md, USER.md or
SCRATCHPAD.md sits beside its AGENTS.md — the workspace file contract, not a
path list, so this generalizes to any embedded workspace. Detection uses
lstat rather than existsSync because those markers are typically symlinks
into a mounted workspace and dangle in a plain checkout; every one of
forge/docs-site's was dangling, which is why a first pass with existsSync saw
none of them.

On saffron this closes Stage A: duplication 0%, drifted 0, governance surface
pass. Stages A, B and C now pass and the verdict moves from CRITICAL to
NEEDS WORK, Structural Lint 56 -> 66. The only remaining blocker is Stage D
context-load pressure, which is a real finding about rule volume.
@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 22 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7b8c9f41-8790-4005-a0cc-582f0a1db8a7

📥 Commits

Reviewing files that changed from the base of the PR and between bab3984 and 9b52055.

📒 Files selected for processing (2)
  • scripts/lib/rule-surface.test.ts
  • scripts/lib/rule-surface.ts

Comment @coderabbitai help to get the list of available commands.

@jaruesink
jaruesink merged commit fd8576a into main Aug 8, 2026
3 checks passed
@jaruesink
jaruesink deleted the fix/exclude-agent-workspaces branch August 8, 2026 06:39
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.

1 participant