Skip to content

docs(core-model): refresh the extension-registry model to match the code#124

Open
wmadden-electric wants to merge 1 commit into
mainfrom
claude/keen-ramanujan-b7267c
Open

docs(core-model): refresh the extension-registry model to match the code#124
wmadden-electric wants to merge 1 commit into
mainfrom
claude/keen-ramanujan-b7267c

Conversation

@wmadden-electric

Copy link
Copy Markdown
Contributor

What

Refresh the core-model.md deep dive so its extension-registry and lowering-SPI model matches the code. The doc still described a Target carrying separate resources / services maps; the code has ExtensionDescriptor (packages/0-framework/1-core/core/src/app-config.ts) with a single nodes registry, settled by ADR-0017 (config statically imports each extension's registry) and ADR-0031 (provisioned param values resolve through the consumer extension's registry).

This is the follow-up the S4 vocabulary sweep (PR #117) explicitly deferred: "The file's broader stale text is untouched (filed follow-up)."

Changes (every claim grounded in the current code)

  • Target/resources/servicesExtensionDescriptor/nodes, with the NodeDescriptor resource | service | build union, PrismaAppConfig/defineConfig, and the provisions/application/providers/preflight fields — matching app-config.ts.
  • Static config-import routing (ADR-0017): /control is a shipped entry, not "reserved". Dropped the stale ${pack}/target fromEnv() and ${build.pack}/assemble dynamic-import story; assemblers are { kind: "build" } registry entries found by (extension, type).
  • packextension on nodes and BuildAdapter ({ extension, type, module, entry }), matching node.ts.
  • Rewrote the prismaCloud() worked instance to the real ExtensionDescriptor: application.provision references the CLI-ensured Project and returns { projectId } satisfies CloudApplication; compute/postgres return { outputs, entities } (LoweredResult) with the reader-typed handoffs from ADR-0033, narrowing ctx.application via a guard.
  • Reconciled the old "there is no config file (ADR-0003)" line with ADR-0017, which narrows ADR-0003 rather than removing the root-node derivation.
  • Adopted the S4 report vocabulary throughout (Outputs, DeployedEntity, DeployedNode, DeploymentResult { app, nodes }); ReportedPrimitive is gone.

Left untouched (as scoped)

The ADR-0033 SPI-signature quotes (ServiceLowering<P,S>, LowerContext.application: unknown) were already correct and are unchanged apart from the vocabulary rename.

Incidental

Stripped two stray tool-call tags (</content></invoke>) that had been committed into the end of ADR-0033-lowering-types-are-defined-by-their-readers.md.

🤖 Generated with Claude Code

The core-model deep dive still described a Target carrying separate
resources/services maps. The code has ExtensionDescriptor with a single
nodes registry (app-config.ts), settled by ADR-0017 (config statically
imports each extension's registry) and ADR-0031 (provisioned param values
resolve through the consumer extension's registry).

Brings the surrounding model in line with the code, grounded in
app-config.ts, deploy.ts, node.ts, and the prisma-cloud control entry:

- Target/resources/services -> ExtensionDescriptor/nodes, with the
  NodeDescriptor resource|service|build union and PrismaAppConfig/defineConfig.
- Static config-import routing (ADR-0017): /control is a shipped entry, not
  reserved; drop the stale ${pack}/target fromEnv() and ${build.pack}/assemble
  dynamic-import story; assemblers are { kind: 'build' } registry entries.
- pack -> extension on nodes and BuildAdapter ({ extension, type, module, entry }).
- Rewrite the prismaCloud() worked instance: application.provision references
  the CLI-ensured Project and returns { projectId } satisfies CloudApplication;
  compute/postgres return { wiring, primitives } (LoweredResult) with the
  reader-typed handoffs from ADR-0033.
- Reconcile the ADR-0003 'no config file' line with ADR-0017, which narrows it.

The ADR-0033 SPI-signature quotes were already correct on this branch and are
left as-is. Also strips two stray tool-call tags committed into ADR-0033.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
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