RFC-0052 · Reference catalog
Versioned draft snapshot
RFCs, reference catalogs, and evidence reflect Spec 3b2e3e7a114fb826b1445d39a48756b8fff629cd. Counts and pending/status notes belong to that snapshot. Read the dated project update for later progress.
Source repositories are private during staging. Links marked “repository access required” need access to the linked repository.
Generated reference catalog. This page renders structured Lean data for RFC-0052: defined terms, diagnostics, dependencies, and invariants. It does not establish proof coverage or runtime conformance. The authored narrative lives in
RFC-0052.This page is generated from the
lean/Gnomon/Spec/module for RFC-0052. Edit that source and regenerate this catalog.
Title: Platform Module Catalog
Status: draft
Owners: Compiler, Module Platform
Diagnostic range: M52000-M52099
Depends on: RFC-0001, RFC-0005, RFC-0006, RFC-0007, RFC-0008, RFC-0010, RFC-0024, RFC-0033, RFC-0036, RFC-0037, RFC-0038, RFC-0039, RFC-0040, RFC-0041, RFC-0042, RFC-0048, RFC-0051
Proof citations in source: 3 / 3. Standalone proof verification is pending.
Definitions
| Term | Meaning |
|---|---|
| Application module | Any non-platform module — savvi., ext., customer-namespaced modules. |
| Bootstrap module | A platform module whose install runs through Phase 1 (bootstrap.sql) rather than the normal install pipeline. Currently: db.graph (partial), db.ids, db.audit core. |
| Install rank | The ordinal position of a module in the install DAG. Determined by dependency closure. |
| Layered module | A platform module that extends another via the extends protocol (RFC-0024 §6.2 generalized) — e.g., core.graph.collection extending core.graph. |
| Platform module | A module in the db.* or core.* namespace that contributes to the runtime substrate. |
Diagnostics
| Code | Severity | Description |
|---|---|---|
M52010 | Error | Application module declared in db.* or core.* namespace; these are reserved |
M52020 | Error | Direct edit to a platform module’s objects from outside its declaring source; use the extends protocol |
M52030 | Error | Application module declares an entity-type, predicate, or predicate-policy whose namespace resolves into core.* or db.* |
M52040 | Error | Module declares ownership of a PostgreSQL schema already owned by another module |
M52041 | Warning | Module’s namespace-derived schema name conflicts with a different module’s existing schema name (case mismatch, etc.) |
M52050 | Error | Install order DAG includes a platform module out of canonical rank order; review manifest dependencies |
M52060 | Warning | Layered module’s extends block references an undeclared kind/predicate/template in the extended module |
M52070 | Error | Platform module template visibility violated (e.g., application module attempts to invoke db.graph.resource-create which is protected) |
M52080 | Info | Phase-1 bootstrap.sql and Phase-2 install produced different end states; fixed-point property violated — review module declarations |
Dependency neighborhood
graph LR
nRFC_0052["RFC-0052"]
nRFC_0001["RFC-0001"]
nRFC_0052 --> nRFC_0001
nRFC_0005["RFC-0005"]
nRFC_0052 --> nRFC_0005
nRFC_0006["RFC-0006"]
nRFC_0052 --> nRFC_0006
nRFC_0007["RFC-0007"]
nRFC_0052 --> nRFC_0007
nRFC_0008["RFC-0008"]
nRFC_0052 --> nRFC_0008
nRFC_0010["RFC-0010"]
nRFC_0052 --> nRFC_0010
nRFC_0024["RFC-0024"]
nRFC_0052 --> nRFC_0024
nRFC_0033["RFC-0033"]
nRFC_0052 --> nRFC_0033
nRFC_0036["RFC-0036"]
nRFC_0052 --> nRFC_0036
nRFC_0037["RFC-0037"]
nRFC_0052 --> nRFC_0037
nRFC_0038["RFC-0038"]
nRFC_0052 --> nRFC_0038
nRFC_0039["RFC-0039"]
nRFC_0052 --> nRFC_0039
nRFC_0040["RFC-0040"]
nRFC_0052 --> nRFC_0040
nRFC_0041["RFC-0041"]
nRFC_0052 --> nRFC_0041
nRFC_0042["RFC-0042"]
nRFC_0052 --> nRFC_0042
nRFC_0048["RFC-0048"]
nRFC_0052 --> nRFC_0048
nRFC_0051["RFC-0051"]
nRFC_0052 --> nRFC_0051
Invariants
- Application modules MUST NOT declare entity-types, predicates, or predicate-policies that resolve into core.* or db.* namespaces. (enforced by: compile-time)
- Application modules MUST NOT declare modules in the reserved db.* or core.* namespaces. (enforced by: compile-time)
- Each db.* module owns at most one PostgreSQL schema whose name matches the module namespace with dots replaced by underscores. (enforced by: compile-time)
- Phase-1 bootstrap.sql plus Phase-2 install produce the same end state as a from-scratch Phase-2 install on an empty DB. (enforced by: install-time)
- Platform module templates are visibility-gated; db.graph.resource-create and db.graph.statement-create MUST be protected to enforce Resource and Statement as intrinsics. (enforced by: compile-time)
- The extends protocol is the only mechanism for adding to a platform module’s surface from another module; direct edits to platform module objects from outside are prohibited. (enforced by: compile-time)
- The install order DAG is deterministic for the canonical platform set; new platform modules MUST preserve the existing rank structure. (enforced by: install-time)
- The system installer principal is the only principal authorized to install platform modules; application installs run as application principals. (enforced by: runtime)
Normative Statements
Statements are structured source data. Proof citations, where present, have not passed a standalone Gnomon proof gate.
Application Modules
- MUST_NOT — Application modules cannot write to platform schemas, extend core.* or db.*, or add to graph.reserved_namespaces.
Install Order DAG
- MUST — Each platform module’s module.gnm declares its modules: dependencies explicitly so the install engine can validate the DAG. (proof citation:
rfc0052_b1_grounded; verification pending)
Invariants
- MUST_NOT — Application modules declare entity-types, predicates, or predicate-policies whose namespaces resolve into core.* or db.*.
- MUST_NOT — Application modules declare modules in the reserved db.* or core.* namespaces.
- MUST_NOT — Direct edits to a platform module’s objects from outside its declaring source are prohibited; use the extends protocol. (proof citation:
rfc0052_b4_grounded; verification pending) - MUST — Each db.* module owns at most one PostgreSQL schema whose name matches the module namespace (with . replaced by _).
- MUST — Future platform modules declare dependencies that preserve the canonical install rank structure.
- MUST — Only the system installer principal is authorized to install platform modules; application module installs run as application principals. (proof citation:
rfc0052_b8_grounded; verification pending) - MUST — Phase-1 bootstrap.sql plus Phase-2 install produces the same end state as a from-scratch Phase-2 install (fixed-point property holds).
- MUST — db.graph.resource-create and db.graph.statement-create templates are protected to enforce Resource/Statement as intrinsics (Architecture A).
Linked References
| Direction | Target |
|---|---|
| Depends on | RFC-0001 |
| Depends on | RFC-0005 |
| Depends on | RFC-0006 |
| Depends on | RFC-0007 |
| Depends on | RFC-0008 |
| Depends on | RFC-0010 |
| Depends on | RFC-0024 |
| Depends on | RFC-0033 |
| Depends on | RFC-0036 |
| Depends on | RFC-0037 |
| Depends on | RFC-0038 |
| Depends on | RFC-0039 |
| Depends on | RFC-0040 |
| Depends on | RFC-0041 |
| Depends on | RFC-0042 |
| Depends on | RFC-0048 |
| Depends on | RFC-0051 |