Skip to content

feat(conformance)!: read the admin's prefix from the admin.prefix slot (dune#123, step 2) - #4

Closed
zumbrunn wants to merge 7 commits into
feat/stub-adminfrom
feat/conformance-admin-prefix
Closed

zumbrunn wants to merge 7 commits into
feat/stub-adminfrom
feat/conformance-admin-prefix

Conversation

@zumbrunn

@zumbrunn zumbrunn commented Nov 6, 2026

Copy link
Copy Markdown
Member

Stacked on #3 (base feat/stub-admin); part of duneorg/dune#123, step 2.

What

Core no longer assumes the admin lives at /admin; an admin provides the admin.prefix capability slot. The conformance suite follows:

  • AdminConformanceDriver.adminPrefix?: string is removed. The suite reads the prefix from the slot. hostsContributions?: boolean replaces it and only switches on the admin.pages / admin.routes checks.
  • New checks: the admin provides admin.prefix (exactly one provider; starts with /, no trailing slash); core reserves that prefix against plugin routes; with no admin, /admin is an ordinary path for plugins.
  • The stub admin provides admin.prefix (/stub-admin by default).
  • Negative tests: an admin with no admin.prefix, and ones with unusable prefixes (/stub-admin/, stub-admin, /), are rejected.

Breaking

Version 2.0.0: a driver that set adminPrefix must set hostsContributions: true instead, and its admin must provide admin.prefix.

Tests

deno task check clean; 44 tests pass against core's step 2 branch (duneorg/dune#126). Needs @dune/core 0.36.

🤖 Generated with Claude Code

zumbrunn and others added 4 commits November 6, 2026 23:28
The driver's adminPrefix option is gone: core no longer assumes /admin, so an
admin must provide the admin.prefix capability, and the suite reads the prefix
from it. adminPrefix?: string becomes hostsContributions?: boolean (it only
enables the admin.pages / admin.routes checks). New checks: the admin provides
admin.prefix, core reserves it against plugin routes, and with no admin /admin
is an ordinary path. The stub admin provides admin.prefix.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Core no longer loads an admin by itself, so there is nothing to disable; a test that wants an
admin lists it in plugins. Part of 2.0.0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Follows @dune/core's rename of the permission resource (duneorg/dune#130).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…une#125)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@zumbrunn
zumbrunn marked this pull request as ready for review November 10, 2026 16:34
zumbrunn added a commit that referenced this pull request Nov 10, 2026
… the split contract (#3, #4, #5)

Lands the whole stack at once: the earlier commits were written against intermediate core APIs and only the top type-checks against @dune/core 0.36.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@zumbrunn

Copy link
Copy Markdown
Member Author

Landed as part of #5 (squash). This stack's intermediate commits were written against intermediate core APIs and do not type-check against @dune/core 0.36 on their own, so the three PRs went in as one change through #5.

@zumbrunn zumbrunn closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant