Skip to content

docs(adr): ADR-0076 — D12 honest capabilities + correct the analytics claim (fallback, not collision)#2433

Merged
os-zhuang merged 2 commits into
mainfrom
docs/adr-0076-rev9
Jun 28, 2026
Merged

docs(adr): ADR-0076 — D12 honest capabilities + correct the analytics claim (fallback, not collision)#2433
os-zhuang merged 2 commits into
mainfrom
docs/adr-0076-rev9

Conversation

@os-zhuang

@os-zhuang os-zhuang commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

What

Adds D12 (honest capabilities) to ADR-0076 and corrects the D10 analytics claim — both stem from a read-only investigation prompted by "many fake services; the AI fake confused an agent."

D12 — honest capabilities

Root cause of agents being misled: stub/dev/fallback services are registered under canonical names, and runtime/http-dispatcher.ts's svcAvailable hardcodes { enabled:true, status:'available', handlerReady:true } for any present service — ignoring stub markers. So discovery.services.* claims capabilities that are only stubbed, and agents/console trust them.

Inventory: plugin-dev's ~8 dev stubs (incl. ai, analytics; already carry _dev:true that nothing respects); ObjectQLPlugin's analytics fallback; the dispatcher hardcode.

Decision: stubs self-identify (standard marker) → discovery reports status:'stub'/handlerReady:false (never available) → consumers trust only real services. Fixes the whole class without deleting any fallback (no /analytics 404) — they stop lying, not stop working. Runtime enforcement of the D9-refinement principle.

Analytics correction (D10)

The earlier "duplicated and collides / delete it" claim was wrong: registerService throws on duplicate, so it's a deliberate fallback + replaceService pattern. The fix is to mark it honestly (D12), not delete it.

Execution

Framework (marker + svcAvailable + discovery stub status) and console (read honest status) land together at the cross-repo window — discovery is a cross-repo contract.

Scope

Docs only — docs/adr/0076-objectql-core-tiering.md (→ D1–D12). No code. Empty changeset.

🤖 Generated with Claude Code

…te fallback+replace, not a collision)

A read-only investigation of A2 (the proposed "drop duplicated analytics") found
the D10 evidence was wrong: analytics is NOT a collision/bug.

`registerService` throws on duplicate (core/kernel.ts), so ObjectQLPlugin registers
a lightweight ~66-line analytics FALLBACK (prevents /analytics 404 in minimal
deployments) and AnalyticsServicePlugin, when installed, calls
`ctx.replaceService('analytics', …)` to swap in the full ~1.8k-LOC engine. No
shadowing; the fallback is intentional and harmless.

Consequently: do NOT delete the fallback as a standalone change (it would 404
/analytics for deployments without service-analytics). A2 is dropped; the
fallback's fate is decided at the cross-repo window with D10/D11. Corrected the
D10 evidence bullet and the "delete the facade's analyticsQuery" target line.

Docs only; empty changeset.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 28, 2026 4:04pm

Request Review

…ort stub/fallback services as real)

The user flagged the systemic issue: many stub/dev/fallback services (incl. a dev
AI stub that confused an agent) are advertised in discovery as fully real.

Root cause: http-dispatcher's `svcAvailable` hardcodes enabled/available/handlerReady
for any present service, ignoring stub markers (plugin-dev's `_dev:true`, the
ObjectQLPlugin analytics fallback, etc.).

D12: a stub/dev/fallback service must self-identify (standard marker), discovery
reports it as status:'stub'/handlerReady:false (never 'available'), and consumers
trust only real services. Fixes the whole class WITHOUT deleting fallbacks (no
/analytics 404) — they stop lying, not stop working. Supersedes the rev.9
"preserve-or-delete" analytics conclusion (the fix is: mark honestly).

Execution at the cross-repo window (console reads discovery.services).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@os-zhuang os-zhuang changed the title docs(adr): ADR-0076 rev.9 — correct the D10 analytics claim (fallback+replace, not a collision) docs(adr): ADR-0076 — D12 honest capabilities + correct the analytics claim (fallback, not collision) Jun 28, 2026
@os-zhuang
os-zhuang merged commit 827b9b6 into main Jun 28, 2026
15 checks passed
@os-zhuang
os-zhuang deleted the docs/adr-0076-rev9 branch June 28, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant