feat(context-mode): make OpenClaw capability reporting truthful#295
feat(context-mode): make OpenClaw capability reporting truthful#295dikotiledon wants to merge 13 commits intomksglu:nextfrom
Conversation
|
Hey @dikotiledon — this is a well-structured PR. The capability classification model (full/degraded/unsupported) is exactly the right approach for OpenClaw. I want to be upfront: I don't use OpenClaw myself day-to-day, so I can't fully evaluate the runtime behavior from code review alone. I need to make sure this works correctly before merging because I'm presenting context-mode to the OpenClaw community soon, and I need confidence that the integration is solid. Before I merge, I need help with verification:
The code looks clean. The monotonic state transitions, the pure classifier in capability.ts, the DB-backed evidence requirement — all good patterns. I just need runtime proof before this ships. If you can share the test output, I'll merge promptly. Thanks for the thorough work. |
|
@dikotiledon why did u closed that man? |
Summary
This PR makes OpenClaw capability reporting in
context-modetruthful and session-specific.Previously, OpenClaw support could be interpreted too broadly from installation state or partial hook activity. This change set moves capability classification behind explicit runtime evidence so the plugin only reports
fullsupport, and only claims active token savings, when DB-backed persistence has actually been observed for the current session.What changed
Capability model
src/openclaw/capability.tsfull,degraded, andunsupportedOpenClaw runtime wiring
src/openclaw-plugin.tsToken savings active: yesclaims without DB-backed proofTests
tests/plugins/openclaw-capability.test.tstests/plugins/openclaw.test.tstests/executor.test.tsctx_doctorregression coverage intests/core/server.test.tsDocs
docs/adapters/openclaw.mdto describe capability-aware supportREADME.mdto explain whatfull,degraded, andunsupportedmean in practicePlan coverage
This PR completes the implementation plan in four parts:
Validation
Passed:
npx vitest run tests/plugins/openclaw-capability.test.ts tests/plugins/openclaw.test.ts --pool threads --maxWorkers 1npx vitest run tests/executor.test.ts -t "Windows: Python runtime prefers python.exe over python3 alias"npx vitest run tests/core/server.test.ts -t "ctx_doctor"npm run buildRuntime guarantees verified:
unsupporteddegradeduntil persistence is provenfullKnown unrelated blockers
A repository-wide full-suite gate is still blocked by pre-existing failures outside this OpenClaw change set:
tests/executor.test.tstests/executor.test.tstests/hooks/integration.test.tsThese are called out explicitly so this PR does not over-claim repo-wide green status.
Risk
Low to moderate.
The behavioral change is intentionally fail-closed: sessions that previously looked implicitly supported may now report
degradedorunsupporteduntil runtime evidence is observed. That is expected and is the point of the patch.Rollback
If needed, revert the PR and restart the gateway. The change set is self-contained to capability classification, plugin reporting, docs, and verification hardening.
Reviewer focus
Please review this as a capability-truthfulness and verification-hardening PR: