Conversation
SaulMoro
marked this pull request as draft
October 2, 2026 00:08
SaulMoro
force-pushed
the
fix/946-rules-delivery
branch
from
October 2, 2026 05:21
b9e9378 to
daf0817
Compare
This was referenced Oct 2, 2026
SaulMoro
force-pushed
the
fix/946-rules-delivery
branch
from
October 3, 2026 06:33
daf0817 to
f87b4d7
Compare
SaulMoro
marked this pull request as ready for review
October 3, 2026 06:33
Collaborator
|
This branch has merge conflicts with |
…ets (Tencent#946) - Keep OpenClaw's default workspace AGENTS.md out of the retired files: its default profile still reads it. - Strip a retired file of a tool with no file and no hook in this scope (OpenClaw in a project) without waiting for a replacement. - Keep doctor's Pi extension check while the project has team rules, even with no instruction blocks. - Adapt the Tencent#945 every-shape test to OpenClaw's workspace install probe and its lack of a project file; drop the Tencent#946 uninstall test Tencent#945's recorded entry ownership superseded.
- Hold back a hook tool's retired instruction file while its hook is not installed; only a tool with no project channel (OpenClaw) releases it. - Mark Hermes and OpenClaw rules always on (✓*) in every README. - Pin that a project uninstall keeps a .opencode/opencode.json left with only $schema once the recorded instructions entry goes. - Resolve the team rules once for doctor's hook checks; use one RulesHandler in the uninstall plan; return early from ruleChannelNotes outside a project; name only the files a project pull touches when the team rules cannot be resolved; drop a stray CHANGELOG period.
SaulMoro
force-pushed
the
fix/946-rules-delivery
branch
from
October 3, 2026 07:04
f87b4d7 to
2c70f26
Compare
|
…namespace globs (Tencent#946) - A flat copy on record is teamai's only while it holds what was recorded or the render; remove and uninstall keep and name an edited one. - OpenCode's user rules globs own every namespace directory a rule landed in at a revision this checkout pulled, so pull and doctor reclaim the glob of a namespace the team deleted.
|
Findings
Resolved
|
…n inline rules (Tencent#946) - A superseded flat copy (fe.style.md beside the author's style.md) goes only while it holds what was recorded or the render; an edited one is kept and named, a member's own file is left alone. - inlinedRulesText reads paths: through the tolerant team-rule parse, so paths: **/*.ts keeps its 'Applies to files matching' line.
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.
Summary
Deliver each tool's rules in its own format or scope-specific channel. Fix OpenCode globs and Hermes' user-only
SOUL.mdwrites. OpenClaw dispatches emitted events; doctor checks what tools read. Upgrade pulls repair unchanged revisions and keep edited copies.README capability changes
Every changed check and the new JoyCode row, matching all five README variants.
✓*means the rules reach the tool but apply always, without path scoping (scoped inline rules include path hints for the model). The✓ → ✓*changes clarify always-on delivery; OpenClaw's old ✓ counted copies in.openclaw/rules, which it never read.JoyCode now has a complete README row:
For JoyCode, native path scoping applies in project scope; the user
rules.txtblock is always on.Type of Change
Test Plan
npx tsc --noEmitpassesnpm run lintpassesnpx vitest runpasses on the rebased branch: 7,851 passed, 20 skippednpm run build, thennpm run test:e2e: 492 passed, 26 skipped on the first rebase ontomain(f87b4d78); not rerun after the second rebase ([bug] Codex gets no team MCP servers in project scope #954, fix(code-knowledge): do not resolve a Swift bare call a type member shadows #962, fix: sync team resources before AI sessions start #964) and the three review rounds, which conflicted only in imports and docsLive mock-model evidence:
Pi 0.99.2 also carried each user/project rule once across two turns. OpenClaw startup/new/reset dispatched in a live gateway.
Real CLI after
npm run build, at2c70f265(rebased ontomain), sandbox HOME, git provider, project scope with Claude, Kiro and OpenClaw enabled:Verified: flat Kiro steering file in Kiro's format; the old OpenClaw project block stripped (the path the rebase had to reconcile); doctor passed. Kiro and OpenClaw themselves were not run.
Real CLI for the Codex review round, at
2428b2cf, user scope with OMP and OpenCode:At
24746434, Pi in user scope and a team rulepaths: **/*.ts(unquoted):Related Issues
Fixes #946.
#952 is merged; this branch is rebased onto
origin/mainwith its carrier commit dropped, so the diff is #946 only.Reconciling #946 with #952's per-member instruction targets (the
reconcilecommit plus in-place conflict resolutions):instruction-targets.tsinstructionTargetFile; retires a movedclaudemd; cleans a retired file only once its writers are reached$DSH_HOME)uninstall.tsinstructionsentry only when pull recorded adding it.opencode/opencode.json$schema-only file stays after the instructions entry goesdoctor-delivery.tsrules.tsteamai-contextrule copy by its renderclaudemdgets blocksmcpProject(#954)toolPathsmigration noteNotes for Reviewers
History: dependency base → nine slices → review fixes.
/code-reviewagainstorigin/mainafter the rebase:2c70f265✓*in all five READMEs; inverse uninstall test; doctor resolves team rules once; oneRulesHandlerin the uninstall plan;ruleChannelNotesearly return; scope-accurate pull warning; CHANGELOG typotool === 'openclaw'/'pi'checks beside the tables, a tool's rule channel spread over four tables,rules.tssize, shared frontmatter shape across the render modules. Each is a cross-cutting move better done on its ownuninstalldeleted the edit; ownership now needs the recorded hash or the render, andremove/uninstallkeep and name an edited one. OpenCode user globs of a namespace the team deleted were no longer owned, so pull and doctor left them loading kept copies; ownership now also covers every namespace directory at a revision this checkout pulled. Both fixed in2428b2cf, each with a failing-first testfe.style.mdbeside the author's placedstyle.md) without proof it was teamai's, so a member's own file of that name went every pull; it now goes only while it holds what was recorded or the render, and an edited copy is kept and named.inlinedRulesTextparsedpaths:strictly, so an unquotedpaths: **/*.tslost itsApplies to files matchingline in every inline channel; it now uses the tolerant team-rule parse. Both fixed in24746434, each with a failing-first test~/.codex); now narrowed, with a failing-first testTEAMAI_RULE_PARSER_BUNDLES, so they skip in CI; byte contracts stand inDoor: Two-way. Code can be reverted; restoring legacy file layouts requires a pull. Migration removes only proven, unedited team copies.
Blast Radius: Rules. Delivery paths, renders, hook configuration, and diagnostics across tools.
Retained limits, verification gaps, and excluded work
.codebuddy, making CodeBuddy count as installed.--patchand may miss the first request. Codex project hooks require trust.TEAMAI_RULE_PARSER_BUNDLESand ran locally only.DSH_HOME.