Skip to content

fix(spec): repair 25 dead PROTOCOL_MAP links + gate them in CI - #3144

Merged
os-zhuang merged 1 commit into
mainfrom
claude/confident-hawking-56be79
Jul 17, 2026
Merged

fix(spec): repair 25 dead PROTOCOL_MAP links + gate them in CI#3144
os-zhuang merged 1 commit into
mainfrom
claude/confident-hawking-56be79

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What

packages/spec/PROTOCOL_MAP.md is hand-written and nothing regenerates it, so renames orphan rows silently. 25 of its 132 src/… links pointed at files that no longer exist.

The reported row was misdiagnosed

The issue suspected a half-update: path left on the old seed file, prose rewritten for the new analytics type. The history says otherwise — the prose "Virtual capabilities for analytics datasets" has been there verbatim since the map was created (ced379b9e), back when data/dataset.zod.ts held the seed schema (object/externalId/mode/records). It never described that file. #1620 didn't half-update the row; the row was wrong from day one.

So it's one wrong row + one absent row, and the fix is both:

The sweep found the same rot everywhere

All from deliberate refactors that left the map behind:

RowsFate
src/hub/** (9)Directory deleted (142703d54). Survivors rehomed: license/registry-config/tenant → src/system, plugin-registry/plugin-security → src/kernel. composer/marketplace/space/hub-federation/api/hub deleted outright. Section 9 removed, Kernel renumbered 10→9.
src/ai (10)Narrowed by 629a7168e. Repointed where a successor exists: agent-action→tool, cost→usage, rag-pipeline→knowledge-source. Dropped nlq/orchestration/predictive/devops-agent/feedback-loop/plugin-development/runtime-ops.
identity/roleidentity/position (ADR-0090 D3 renamed sys_rolesys_position).
security/policy, system/compliance, system/maskingRemoved as dead (#2387, ADR-0056 D8) — rows dropped.

Repoint vs. drop was decided per row from the deleting commit, not guessed.

The gate

scripts/protocol-map.test.ts asserts every link resolves. Proven to go red first — it listed exactly the 25 dead links before the fix, then went green.

Placement reasoning, since a gate that can't block is theatre:

  • It rides Test Core (one of main's 4 required checks). core: packages/** covers the file, and turbo's $TURBO_DEFAULT$ inputs include it — so a map-only edit re-runs the test instead of cache-hitting to a false green.
  • A new workflow job would not have blocked merges (main requires only 4 checks), and check-links.yml is dormant (workflow_dispatch only) and doesn't cover packages/spec.
  • It asserts links only, not completeness — the map is a curated digest, not a generated index. Proportional to a hand-written internal file.

Relationship to #3138

Sibling, not duplicate. One #1620 rename had two victims:

A plain assertion is the whole job here, so this needs no script or workflow step — and Test Core's packages/** filter has no blind spot for spec changes.

Verification

  • Gate red before fix (25 links), green after.
  • Independent shell oracle (different implementation) confirms 0 dead links across 125.
  • Full spec suite: 255 files / 6892 tests pass. tsc --noEmit clean.

Docs-only → skip-changeset.

🤖 Generated with Claude Code

PROTOCOL_MAP.md is hand-written and nothing regenerates it, so renames
orphan rows silently. 25 of its 132 `src/…` links pointed at files that no
longer exist.
The reported row was misdiagnosed, and the git history says why. The prose
"Virtual capabilities for analytics datasets" was NOT a half-finished
rewrite left by #1620 — it has been there verbatim since the map was created
(ced379b), when `data/dataset.zod.ts` held the *seed* schema
(object/externalId/mode/records). It never described that file. So this is
one wrong row plus one absent row, not one half-updated row:
- `data/dataset.zod.ts` -> `data/seed.zod.ts`, described as seed fixtures
(renamed by #1620 to free `dataset` for analytics, ADR-0021).
- the analytics dataset the old prose was reaching for is a real, unlisted
schema: added as `ui/dataset.zod.ts` (ADR-0021 semantic layer).
The sweep found the same rot everywhere, all from deliberate refactors that
left the map behind:
- `src/hub/**` (9 rows) — the directory no longer exists (142703d).
Survivors rehomed: license/registry-config/tenant -> src/system,
plugin-registry/plugin-security -> src/kernel; composer, marketplace,
space, hub-federation and api/hub were deleted outright. Section 9 is
therefore gone and Kernel renumbered 10 -> 9.
- `src/ai` (10 rows) — narrowed by 629a716. Repointed where a successor
exists (agent-action -> tool, cost -> usage, rag-pipeline ->
knowledge-source); dropped nlq/orchestration/predictive/devops-agent/
feedback-loop/plugin-development/runtime-ops.
- `identity/role` -> `identity/position` (ADR-0090 D3 renamed sys_role).
- `security/policy` (#2387), `system/compliance` + `system/masking`
(ADR-0056 D8) — removed as dead, rows dropped.
Gate: scripts/protocol-map.test.ts asserts every link resolves. Proven to go
red first — it listed exactly the 25 dead links before the fix. It rides Test
Core (required); `core: packages/**` covers the file and turbo's
$TURBO_DEFAULT$ inputs include it, so a map-only edit still re-runs the test
rather than cache-hitting to a false green. A new workflow job would not have
blocked merges (main requires only 4 checks), and check-links.yml is dormant
(workflow_dispatch only) and does not cover packages/spec.
Deliberately asserts links only, not completeness: the map is a curated
digest, not a generated index.
Sibling of #3138, which fixed the identical stale `data/dataset.zod.ts`
pointer in build-skill-references.ts's SKILL_MAP. That one guards generated
artifacts that ship to third parties; PROTOCOL_MAP.md is hand-written and
repo-internal (not in the package's npm `files`), so it needs its own check.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@os-zhuangos-zhuang added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Jul 17, 2026
@vercel

vercelBot commented Jul 17, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
specBuildingBuildingPreview, CommentJul 17, 2026 1:56pm

Request Review

@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation tests tooling size/m labels Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/spec.

102 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/ai/agents.mdx(via @objectstack/spec)
  • content/docs/ai/skills-reference.mdx(via @objectstack/spec)
  • content/docs/ai/skills.mdx(via @objectstack/spec)
  • content/docs/api/client-sdk.mdx(via @objectstack/spec)
  • content/docs/api/environment-routing.mdx(via @objectstack/spec)
  • content/docs/api/error-catalog.mdx(via @objectstack/spec)
  • content/docs/api/error-handling-client.mdx(via @objectstack/spec)
  • content/docs/api/error-handling-server.mdx(via @objectstack/spec)
  • content/docs/api/index.mdx(via @objectstack/spec)
  • content/docs/automation/approvals.mdx(via packages/spec)
  • content/docs/automation/flows.mdx(via @objectstack/spec)
  • content/docs/automation/hook-bodies.mdx(via packages/spec)
  • content/docs/automation/hooks.mdx(via @objectstack/spec)
  • content/docs/automation/index.mdx(via @objectstack/spec)
  • content/docs/automation/webhooks.mdx(via @objectstack/spec)
  • content/docs/automation/workflows.mdx(via @objectstack/spec)
  • content/docs/concepts/architecture.mdx(via @objectstack/spec)
  • content/docs/concepts/design-principles.mdx(via packages/spec)
  • content/docs/concepts/index.mdx(via @objectstack/spec)
  • content/docs/concepts/metadata-driven.mdx(via @objectstack/spec)
  • content/docs/concepts/metadata-lifecycle.mdx(via packages/spec)
  • content/docs/concepts/north-star.mdx(via packages/spec)
  • content/docs/data-modeling/analytics.mdx(via @objectstack/spec)
  • content/docs/data-modeling/drivers.mdx(via @objectstack/spec)
  • content/docs/data-modeling/external-datasources.mdx(via @objectstack/spec)
  • content/docs/data-modeling/field-types.mdx(via @objectstack/spec)
  • content/docs/data-modeling/fields.mdx(via @objectstack/spec)
  • content/docs/data-modeling/formulas.mdx(via @objectstack/spec)
  • content/docs/data-modeling/index.mdx(via @objectstack/spec)
  • content/docs/data-modeling/objects.mdx(via @objectstack/spec)
  • content/docs/data-modeling/queries.mdx(via @objectstack/spec)
  • content/docs/data-modeling/schema-design.mdx(via @objectstack/spec)
  • content/docs/data-modeling/seed-data.mdx(via @objectstack/spec)
  • content/docs/data-modeling/validation-rules.mdx(via @objectstack/spec)
  • content/docs/data-modeling/validation.mdx(via @objectstack/spec)
  • content/docs/deployment/troubleshooting.mdx(via @objectstack/spec)
  • content/docs/getting-started/build-with-claude-code.mdx(via @objectstack/spec)
  • content/docs/getting-started/cli.mdx(via @objectstack/spec)
  • content/docs/getting-started/common-patterns.mdx(via @objectstack/spec)
  • content/docs/getting-started/examples.mdx(via @objectstack/spec)
  • content/docs/getting-started/quick-reference.mdx(via @objectstack/spec)
  • content/docs/getting-started/quick-start.mdx(via @objectstack/spec)
  • content/docs/getting-started/validating-metadata.mdx(via @objectstack/spec)
  • content/docs/getting-started/your-first-project.mdx(via @objectstack/spec)
  • content/docs/kernel/cluster.mdx(via @objectstack/spec)
  • content/docs/kernel/contracts/auth-service.mdx(via packages/spec)
  • content/docs/kernel/contracts/cache-service.mdx(via packages/spec)
  • content/docs/kernel/contracts/data-engine.mdx(via @objectstack/spec)
  • content/docs/kernel/contracts/index.mdx(via @objectstack/spec)
  • content/docs/kernel/contracts/metadata-service.mdx(via packages/spec)
  • content/docs/kernel/contracts/storage-service.mdx(via packages/spec)
  • content/docs/kernel/index.mdx(via packages/spec)
  • content/docs/kernel/runtime-services/email-service.mdx(via packages/spec)
  • content/docs/kernel/runtime-services/index.mdx(via packages/spec)
  • content/docs/kernel/runtime-services/queue-service.mdx(via packages/spec)
  • content/docs/kernel/runtime-services/sharing-service.mdx(via packages/spec)
  • content/docs/kernel/runtime-services/sms-service.mdx(via packages/spec)
  • content/docs/kernel/runtime-services/storage-service.mdx(via packages/spec)
  • content/docs/kernel/services-checklist.mdx(via @objectstack/spec)
  • content/docs/permissions/authorization.mdx(via @objectstack/spec)
  • content/docs/permissions/permission-sets.mdx(via @objectstack/spec)
  • content/docs/permissions/permissions-matrix.mdx(via @objectstack/spec)
  • content/docs/permissions/positions.mdx(via @objectstack/spec)
  • content/docs/permissions/rls.mdx(via @objectstack/spec)
  • content/docs/permissions/sharing-rules.mdx(via @objectstack/spec)
  • content/docs/plugins/adding-a-metadata-type.mdx(via @objectstack/spec)
  • content/docs/plugins/development.mdx(via @objectstack/spec)
  • content/docs/plugins/index.mdx(via @objectstack/spec)
  • content/docs/plugins/packages.mdx(via @objectstack/spec)
  • content/docs/protocol/backward-compatibility.mdx(via @objectstack/spec)
  • content/docs/protocol/diagram.mdx(via packages/spec)
  • content/docs/protocol/kernel/config-resolution.mdx(via @objectstack/spec)
  • content/docs/protocol/kernel/i18n-standard.mdx(via @objectstack/spec)
  • content/docs/protocol/kernel/lifecycle.mdx(via @objectstack/spec)
  • content/docs/protocol/kernel/plugin-spec.mdx(via @objectstack/spec)
  • content/docs/protocol/kernel/runtime-capabilities.mdx(via @objectstack/spec)
  • content/docs/protocol/knowledge.mdx(via @objectstack/spec)
  • content/docs/protocol/objectql/index.mdx(via packages/spec)
  • content/docs/protocol/objectql/query-syntax.mdx(via @objectstack/spec)
  • content/docs/protocol/objectql/schema.mdx(via @objectstack/spec)
  • content/docs/protocol/objectql/security.mdx(via packages/spec)
  • content/docs/protocol/objectql/state-machine.mdx(via @objectstack/spec)
  • content/docs/protocol/objectui/actions.mdx(via @objectstack/spec)
  • content/docs/protocol/objectui/concept.mdx(via @objectstack/spec)
  • content/docs/protocol/objectui/index.mdx(via @objectstack/spec)
  • content/docs/protocol/objectui/layout-dsl.mdx(via @objectstack/spec)
  • content/docs/protocol/objectui/record-alert.mdx(via @objectstack/spec)
  • content/docs/protocol/objectui/widget-contract.mdx(via @objectstack/spec)
  • content/docs/releases/implementation-status.mdx(via @objectstack/spec)
  • content/docs/releases/index.mdx(via @objectstack/spec)
  • content/docs/releases/v12.mdx(via @objectstack/spec)
  • content/docs/releases/v13.mdx(via @objectstack/spec)
  • content/docs/releases/v9.mdx(via @objectstack/spec)
  • content/docs/ui/actions.mdx(via @objectstack/spec)
  • content/docs/ui/create-vs-edit-form.mdx(via @objectstack/spec)
  • content/docs/ui/dashboards.mdx(via @objectstack/spec)
  • content/docs/ui/forms.mdx(via @objectstack/spec)
  • content/docs/ui/index.mdx(via @objectstack/spec)
  • content/docs/ui/public-data-collection.mdx(via @objectstack/spec)
  • content/docs/ui/setup-app.mdx(via @objectstack/spec)
  • content/docs/ui/translations.mdx(via @objectstack/spec)
  • content/docs/ui/views.mdx(via @objectstack/spec)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@os-zhuang
os-zhuang merged commit dd355a7 into mainJul 17, 2026
19 of 20 checks passed
@os-zhuang
os-zhuang deleted the claude/confident-hawking-56be79 branch July 17, 2026 14:31
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/mskip-changesetPR has no user-facing published change; bypasses the changeset gateteststooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@os-zhuang