Repository navigation
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: #78678 merged the canonical oc-path substrate, CLI, docs, and tests, and current main now carries that implementation. This narrower read-only resolver branch also still has the known slash-bearing returned-path bug. So I’m closing this here and keeping the remaining discussion on the canonical linked item. Review detailsBest possible solution: Keep the merged opt-in Do we have a high-confidence way to reproduce the issue? Not applicable as a current-main bug: this is a feature PR. The remaining patch-specific defect is source-reproducible from Is this the best way to solve the issue? No: this branch is no longer the best implementation path because the merged opt-in plugin provides the broader resolver, formatter, find/set verbs, CLI, docs, and round-trip coverage on current main. Security review: Security review cleared: The diff adds pure in-memory resolver code and tests using an existing dependency, with no concrete security or supply-chain concern found. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 42b95a9eb1eb; fix evidence: commit bc735f4fde6f, main fix timestamp 2026-05-08T05:26:29Z. |
|
Hi @dev111-actor — heads up that I've opened #78678 which addresses the full scope of #78051 (the issue this PR closes). I've narrowed #78051 to focus specifically on
Happy to defer to the maintainers on which approach lands. If #78678 is preferred, this PR can be closed; if there are pieces of your read-only resolver design they prefer, I'd welcome feedback to reconcile. Either way, appreciate you picking up the issue quickly. |
|
Thanks for the detailed heads-up. I agree #78678 appears to cover the broader substrate shape that #78051 was originally pointing toward, especially the write path, byte-preserving emit chain, richer oc:// addressing semantics, and the adversarial/round-trip coverage. My PR was intentionally narrower and focused on a read-only resolver slice, so I’m happy to defer if maintainers prefer #78678 as the canonical implementation path. The main areas I’d still like to compare are:
I’ll hold off on pushing this further until maintainers weigh in. If #78678 is selected, I’m fine closing this PR and helping reconcile any useful pieces from the read-only design into that branch. |
Summary
oc://addressing substrate — feedback wanted #78051 need a small shared addressing foundation before larger lint, doctor, rollback, or policy work can be reviewed safely.oc://resolver for JSON/JSONC/JSON5 values and markdown heading sections, with focused unit coverage.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
oc://addressing substrate — feedback wanted #78051Real behavior proof (required for external PRs)
Behavior or issue addressed: Internal workspace addressing can now resolve supported
oc://paths over JSONC and markdown content without introducing broader runtime behavior.Real environment tested: Local OpenClaw checkout on Linux.
Exact steps or command run after this patch:
node --import tsx - <<'NODE' ... NODEEvidence after fix: copied console output from the live local OpenClaw checkout:
{ "jsoncPredicate": { "kind": "value", "path": "oc://policy.jsonc/tools/[id=send-email]/sensitivity", "value": "restricted" }, "jsoncWildcard": [ "send-email", "calendar" ], "markdownSection": { "kind": "markdown-section", "path": "oc://AGENTS.md/Tools/send-email", "heading": "send-email", "line": 5, "valueText": "Email body." } }Observed result after fix: The resolver returned the expected JSONC predicate value, wildcard JSONC values, and markdown section content from a real local module import.
What was not tested: CLI usage, doctor integration, plugin registration, write/edit operations, and live runtime use, because this PR intentionally does not add those surfaces.
Before evidence: Current main has no
parseOcPath,resolveOcPath,findOcPaths,registerLintRule,OcPathFixerSpec,PolicyIR, or generalized LKG substrate.Root Cause (if applicable)
N/A
oc://addressing substrate — feedback wanted #78051 is a design proposal, not a runtime regression.Regression Test Plan (if applicable)
N/A
src/shared/oc-path.test.tsoc://parsing and read-only resolution for JSONC values, array indexes, predicates, wildcards, and markdown heading sections.User-visible / Behavior Changes
None.
Diagram (if applicable)
Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation: N/ARepro + Verification
Environment
Steps
pnpm test src/shared/oc-path.test.ts.pnpm exec oxfmt --check --threads=1 src/shared/oc-path.ts src/shared/oc-path.test.ts.git diff --cached --check.node --import tsxsmoke shown in the real behavior proof section.Expected
Actual
Evidence
Human Verification (required)
oc://parsing, invalid/unsupported paths, JSONC object/array/negative-index/predicate/wildcard paths, and markdown heading/wildcard paths.Review Conversations
Compatibility / Migration
Yes)No)No)Risks and Mitigations
oc://addressing substrate — feedback wanted #78051 substrate train rather than a narrow foundation.