Data (1 of 4)
12 specifications, 149 requirements. All libraries
0001 The layers
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/governance-neutral.test.ts: the code of governance names no engine and no part of a relational schema |
FR-002 | check | bun run verify | suite/logical-project.test.ts: project returns the schema as a value, and a projection is a value given to it or contributed through the engine |
FR-003 | check | bun run verify | suite/physical-neutral.test.ts: the code of the physical core names no engine |
FR-004 | check | bun run verify | suite/layers.test.ts: the real tree has no finding of the layers check, and verify runs the check against its baseline; suite/layers.test.ts: an import that climbs is layers/above, and one that reaches around is layers/around; suite/layers.test.ts: an extension does not import another unit of its own class, and a suite and the command line import what they need |
FR-005 | check | bun run verify | suite/layers.test.ts: the lower layers import only the kernel and the package, and a driver, a host module or another package is layers/external |
FR-006 | check | bun run verify | suite/logical-project.test.ts: the schema is plain data whose elements have identities of their own and trace to governance elements; suite/physical-bind.test.ts: every statement carries the logical elements it was made from |
FR-007 | check | bun run verify | suite/documentation.test.ts: the documentation table is made where there is no comment, everywhere, or nowhere, as its setting says |
FR-008 | check | bun run verify | suite/layers.test.ts: every file of the real tree is in a unit, and a file in none is layers/unclassified |
FR-009 | check | bun run verify | suite/layers.test.ts: the four layer entries of exports are the api.ts of their folders, and a subpath exports does not name is layers/private |
FR-010 | check | bun run verify | suite/layers.test.ts: a relative import into another unit is layers/relative, and one inside the unit is not |
FR-011 | check | bun run verify | suite/layers.test.ts: the real tree has no finding of the layers check, and verify runs the check against its baseline; suite/layers.test.ts: the check reads every form of import and no comment, and gives each finding a key that does not name its line; suite/trace.test.ts: a citation is read against this library's specifications, not commons' |
FR-012 | check | bun run verify | suite/logical-project.test.ts: the columns of every table of the model it replaces are what the words of the attributes and relationships make, the key first; suite/physical-bind.test.ts: the case style writes every name, and a snake case schema is the default |
0002 The engine
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/layers.test.ts: the lower layers import only the kernel and the package, and a driver, a host module or another package is layers/external; suite/layers.test.ts: the engine of the real tree imports nothing of the library and only the kernel by package name |
FR-002 | check | bun run verify | suite/engine.test.ts: a point carries its name and is frozen, and a name with no namespace does not compile |
FR-003 | check | bun run verify | suite/engine-manifest.test.ts: an identifier is lower-case words joined by - or ., and anything else is an error value; suite/engine-manifest.test.ts: a manifest is frozen data with the engine's contract and empty lists by default; suite/engine-manifest.test.ts: a lazy entry holds what the engine must know before it loads, and its loader |
FR-004 | check | bun run verify | suite/engine-manifest.test.ts: a contribution is typed by its point, and a value of another type does not compile |
FR-005 | check | bun run verify | suite/engine-compose.test.ts: an extension defined in an imported module is in no composition until the project lists it |
FR-006 | check | bun run verify | suite/engine-compose.test.ts: the order satisfies requires, and keeps the project's order where requires does not decide; suite/engine-compose.test.ts: a duplicate, a missing extension, a cycle and a contract the engine lacks are returned as values, and all together; suite/engine-compose.test.ts: a handle that an extension uses and the project did not provide is returned, and one that it provided is not |
FR-007 | check | bun run verify | suite/engine-compose.test.ts: what a layer needs reaches it as the contributions of a point, in the order of the composition |
FR-008 | check | bun run verify | suite/engine-activation.test.ts: start activates the extensions that are not lazy, in order, once each; suite/engine-activation.test.ts: a lazy extension is loaded and activated only when its event is fired, and its contributions appear then; suite/engine-activation.test.ts: two events at once load and activate a lazy extension once; suite/engine-activation.test.ts: a lazy extension is activated after what it requires, even what is lazy or not yet started; suite/engine-activation.test.ts: a load with another identifier, a load that fails and an activate that throws come back as values, and stay failed; suite/engine-manifest.test.ts: a lazy entry holds what the engine must know before it loads, and its loader |
FR-009 | check | bun run verify | suite/engine-activation.test.ts: activate can use only the handles the manifest declared and the project provided, typed by the handle; suite/engine-activation.test.ts: a lazy extension that declares a handle the project did not provide is not activated, and says which; suite/engine-compose.test.ts: a handle that an extension uses and the project did not provide is returned, and one that it provided is not |
0003 Governance
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/governance-model.test.ts: the constructors are total and the pieces are frozen data with their defaults; suite/governance-model.test.ts: a domain is the domain, with its definition, concepts and code lists, when nothing is wrong; suite/governance-model.test.ts: a relationship given as a function lets two concepts refer to each other; suite/governance-model.test.ts: a concept may be identified by a relationship of cardinality one, which makes it a specialization, and by no other |
FR-002 | check | bun run verify | suite/governance-model.test.ts: a datatype names no database, and every case is described |
FR-003 | check | bun run verify | suite/governance-model.test.ts: the names of a concept are literal types, and an identifying attribute it lacks does not compile; suite/governance-model.test.ts: a concept may be identified by a relationship of cardinality one, which makes it a specialization, and by no other |
FR-004 | check | bun run verify | suite/governance-model.test.ts: a name that is not lower camel case, a duplicate and an annotation out of place are returned together; suite/governance-model.test.ts: a relationship to a concept outside the domain, a code of a list outside it, and an attribute and a relationship with one name are unresolved or duplicate; suite/governance-model.test.ts: a relationship given as a function lets two concepts refer to each other; suite/governance-model.test.ts: a concept with no identifying attribute, one identified by an optional attribute, and one by an attribute it lacks are returned; suite/governance-model.test.ts: a concept may be identified by a relationship of cardinality one, which makes it a specialization, and by no other |
FR-005 | check | bun run verify | suite/governance-elements.test.ts: an identity is made of names: d, d/c, d/c.a, d/c>r, d/list:l and d/list:l.k; suite/governance-elements.test.ts: every element is listed in a fixed order with its identity, kind, name, definition and parent |
FR-006 | check | bun run verify | suite/governance-elements.test.ts: the trace graph has the elements as nodes and contains, identifies and references as edges; suite/governance-elements.test.ts: a concept identified by a relationship has an identifies edge to the relationship |
FR-007 | check | bun run verify | suite/governance-annotations.test.ts: an annotation is typed by its kind, says where it may be, and is read back typed |
FR-008 | check | bun run verify | suite/governance-annotations.test.ts: an extension contributes a vocabulary through the engine, and the composition gives them in its order |
FR-009 | check | bun run verify | suite/governance-annotations.test.ts: lint returns data: the core rules find a missing definition and an unknown kind, in the order of the elements; suite/governance-annotations.test.ts: a vocabulary's rules run after the core rules, in the order of the vocabularies given |
FR-010 | check | bun run verify | suite/governance-vocabularies.test.ts: the documentation kinds go where they say, and the vocabulary has no rule |
FR-011 | check | bun run verify | suite/governance-vocabularies.test.ts: a citation is NNNN-slug FR-nnn, requirementsOf says who cites what, and the rules find an uncited concept and a malformed citation |
FR-012 | check | bun run verify | suite/governance-vocabularies.test.ts: personal data names a DPV-PD term, whose class and IRI are the vocabulary's, and the rules find a missing category and purpose |
FR-013 | check | bun run verify | suite/governance-dpv.test.ts: a CSV that is not the pinned one is refused with the digest it has, and nothing is made of it; suite/governance-dpv.test.ts: the generated file says where it came from, at the pinned version and digest, and is not edited by hand; suite/governance-dpv.test.ts: every term is a term of DPV-PD with a class DPV gives, and the classes are DPV's three |
FR-014 | check | bun run verify | suite/governance-vocabularies.test.ts: the security kinds go where they say, and the rules find two scopes, restricted data with no access and personal data that is not protected |
FR-015 | check | bun run verify | suite/governance-vocabularies.test.ts: an owner or a steward goes on a domain, a concept or a code list, and a concept with no owner where the domain has none is found |
FR-016 | check | bun run verify | suite/governance-vocabularies.test.ts: the quality kinds go where they say, and the rules find a bad pattern, an inverted range, a bad retention and a deprecation with no replacement; suite/governance-vocabularies.test.ts: unique, differs, audited, openness and default go where they say, and a member the concept lacks or a default that does not fit is found; suite/governance-vocabularies.test.ts: a default is held to its datatype: text, whole numbers, true or false, and a code of its list |
FR-017 | check | bun run verify | suite/governance-vocabularies.test.ts: a lookup goes on a concept and says its members, and one that names a member the concept lacks is found |
0004 Arca, the party model
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/arca.test.ts: the party model is a valid domain named arcaParty, given as a result |
FR-002 | check | bun run verify | suite/arca.test.ts: the domain has the concepts and code lists the model it replaces had, with their attributes and relationships; suite/arca.test.ts: every table and column of the model it replaces is what the words of this domain's names make in snake case |
FR-003 | check | bun run verify | suite/arca.test.ts: a person and an organization are identified by their party, every other concept by an attribute named for it |
FR-004 | check | bun run verify | suite/arca.test.ts: every element has a definition, and lint with every vocabulary of the library finds nothing |
FR-005 | check | bun run verify | suite/arca.test.ts: personal data names a category of DPV-PD that exists and what it is held for, and its concepts are confidential |
FR-006 | check | bun run verify | suite/arca.test.ts: the reference code lists carry the codes the model it replaces loaded, and are open; the two closed lists carry theirs; suite/arca.test.ts: every table and column of the model it replaces is what the words of this domain's names make in snake case |
FR-007 | check | bun run verify | suite/arca.test.ts: the domain is audited with removal by marking, and says who answers for it |
FR-008 | check | bun run verify | suite/arca.test.ts: the business structure is governance: one identifier of a kind, two parties that differ, a default, and the ways the data is found |
FR-009 | check | bun run verify | suite/arca.test.ts: every concept cites requirements, and every citation names a requirement that exists in this library's specifications |
FR-010 | check | bun run verify | suite/arca.test.ts: every table and column of the model it replaces is what the words of this domain's names make in snake case; suite/arca.test.ts: every name in the domain is lower camel case, and splits into the words of the old model's names |
0005 Names
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/naming.test.ts: a name is lower camel case: a letter first and then letters and digits, with no underscore; suite/naming.test.ts: domain returns a name that holds an underscore or begins with a capital as an error, for every kind of element |
FR-002 | check | bun run verify | suite/naming.test.ts: words splits at lower to upper, around digits and at the end of a run of capitals, in lower case; suite/naming.test.ts: for every valid name the words are at least one, the same every time, and make the name again when joined |
FR-003 | check | bun run verify | suite/logical-project.test.ts: the columns of every table of the model it replaces are what the words of the attributes and relationships make, the key first |
FR-004 | check | bun run verify | suite/physical-bind.test.ts: the case style writes every name, and a snake case schema is the default |
FR-005 | check | bun run verify | suite/physical-case.test.ts: an extension adds a case style through the engine, and snake case is the default naming |
FR-006 | check | bun run verify | suite/physical-case.test.ts: a code is stored by the style of the codes by default, by another style, or as its name |
FR-007 | check | bun run verify | suite/logical-project.test.ts: two tables, two columns of a table, or two constraints that are named alike are returned with the elements that clash |
0006 The logical schema
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/logical-project.test.ts: the schema is plain data whose elements have identities of their own and trace to governance elements |
FR-002 | check | bun run verify | suite/logical-project.test.ts: a column's type is a logical type, and none names an engine |
FR-003 | check | bun run verify | suite/logical-project.test.ts: project returns the schema as a value, and a projection is a value given to it or contributed through the engine |
FR-004 | check | bun run verify | suite/logical-project.test.ts: a concept is a table, an open code list a code table of its codes, and a closed code list no table but a value set |
FR-005 | check | bun run verify | suite/logical-project.test.ts: the columns of every table of the model it replaces are what the words of the attributes and relationships make, the key first; suite/logical-project.test.ts: the shapes Arca does not use: a relationship that is many, an attribute that is many, an optional relationship and a key of several columns; suite/logical-project.test.ts: the words of the columns that refer to a key, from 0005-naming FR-003; suite/logical-project.test.ts: a concept identified through a cycle of identities is an error value, not a hang |
FR-006 | check | bun run verify | suite/logical-project.test.ts: the constraints and indexes carry the names the model it replaces gave them, and the two inline checks are named too; suite/logical-project.test.ts: a default, a range, a pattern and a code default are made where the vocabularies say, and a default that is a code stays a name |
FR-007 | check | bun run verify | suite/logical-project.test.ts: an audited domain gives every concept table the audit columns, a code table none, and removal by deleting leaves out the columns of removal |
FR-008 | check | bun run verify | suite/logical-project.test.ts: the comment of a table and of a column is the definition of what it was made from |
FR-009 | check | bun run verify | suite/logical-project.test.ts: two tables, two columns of a table, or two constraints that are named alike are returned with the elements that clash; suite/logical-project.test.ts: a concept identified through a cycle of identities is an error value, not a hang |
FR-010 | check | bun run verify | suite/logical-project.test.ts: the schema is plain data whose elements have identities of their own and trace to governance elements |
FR-011 | check | bun run verify | suite/logical-flow.test.ts: every annotation of the domain is in the report once, and only those; suite/logical-flow.test.ts: an expressed annotation names the elements it became, and a carried one the elements that keep it, and each of them is in the schema; suite/logical-flow.test.ts: what the schema cannot express it keeps, as it was, on the tables, columns and the schema it was made for; suite/logical-flow.test.ts: an annotation of a kind the projection knows nothing about is unexpressed in the report, and carried where the projection is told to carry it |
FR-012 | check | bun run verify | suite/logical-rows.test.ts: the value of an attribute is typed by its datatype, a code by the names of its list, an optional one by null and a many one by a list; suite/logical-rows.test.ts: a relationship holds the key of what it points to, null where it is optional and a list where it is many; suite/logical-rows.test.ts: the key of a concept is its identifying member's value, a record where there are several, and a specialization's is its party's; suite/logical-rows.test.ts: Arca's rows are typed by what the model says: its codes, its optional attributes and its party; suite/logical-rows.test.ts: a row to insert may leave out what is optional or many, and nothing else |
FR-013 | check | bun run verify | suite/logical-neutral.test.ts: the code of the logical schema names no engine and no type of one |
0007 The physical schema
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/physical-bind.test.ts: the case style writes every name, and a snake case schema is the default; suite/physical-case.test.ts: snake, camel and pascal write words as names, a digit joining without a capital; suite/physical-case.test.ts: the words of a valid name written in camel are that name, for generated names; suite/physical-case.test.ts: an extension adds a case style through the engine, and snake case is the default naming |
FR-002 | check | bun run verify | suite/physical-bind.test.ts: reference rows are upserts with the codes written by the style of the codes, in snake case, by another style, or as their names; suite/physical-case.test.ts: a code is stored by the style of the codes by default, by another style, or as its name |
FR-003 | check | bun run verify | suite/physical-bind.test.ts: a name that is too long, and two names that are alike once written, are error values with the elements that clash |
FR-004 | check | bun run verify | suite/physical-bind.test.ts: the DDL of a small domain, written out for each dialect, with the types of each engine; suite/physical-bind.test.ts: the three dialects are extensions that contribute themselves through the engine |
FR-005 | check | bun run verify | suite/physical-bind.test.ts: a pattern is a check where the engine has a regular expression, and an error value naming the check where it has none |
FR-006 | check | bun run verify | suite/physical-bind.test.ts: a table follows the tables its foreign keys refer to, indexes follow tables, data follows both, and the groups are in their order; suite/physical-bind.test.ts: a cycle of foreign keys is added afterwards where the engine can add a constraint, and is an error value where it cannot |
FR-007 | check | bun run verify | suite/physical-bind.test.ts: the DDL of a small domain, written out for each dialect, with the types of each engine; suite/physical-bind.test.ts: a table follows the tables its foreign keys refer to, indexes follow tables, data follows both, and the groups are in their order; suite/physical-bind.test.ts: the case style writes every name, and a snake case schema is the default |
FR-008 | check | bun run verify | suite/physical-bind.test.ts: reference rows are upserts with the codes written by the style of the codes, in snake case, by another style, or as their names; suite/physical-engines.test.ts: ${name}: the reference data is loaded, in the codes of the model it replaces, and loaded twice leaves the same rows |
FR-009 | check | bun run verify | suite/physical-bind.test.ts: every statement carries the logical elements it was made from |
FR-010 | check | bun run verify | suite/physical-bind.test.ts: the same input gives the same text, and an extension adds statements by group, being given the written names |
FR-011 | check | bun run verify | suite/physical-bind.test.ts: the same input gives the same text, and an extension adds statements by group, being given the written names |
FR-012 | check | bun run verify | suite/physical-engines.test.ts: ${name}: the statements load, and the engine holds the tables, columns, nullability, primary keys and indexes of the logical schema; suite/physical-engines.test.ts: ${name}: the engine refuses what the constraints forbid and accepts what they allow; suite/physical-engines.test.ts: ${name}: the reference data is loaded, in the codes of the model it replaces, and loaded twice leaves the same rows |
FR-013 | check | bun run verify | suite/physical-neutral.test.ts: the code of the physical core names no engine; suite/physical-neutral.test.ts: each dialect names its own engine and no other |
FR-014 | check | bun run verify | suite/refs.test.ts: the written names of tables and columns are given by words in any case style, qualified where the schema is, and a name that is not there is an error value, the tables asked for being kept in order |
FR-015 | check | bun run verify | suite/refs.test.ts: CSV text is read as RFC 4180 does, with quotes, doubled quotes, any line end and a delimiter that is a parameter |
0008 Documentation in the database
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/documentation.test.ts: PostgreSQL and DuckDB keep the description of every table and column as a comment, as governance wrote it, and SQLite is given none; suite/documentation.test.ts: a description with a quote is written with the quote doubled, a column with none has no comment |
FR-002 | check | bun run verify | suite/documentation.test.ts: the documentation table is made where there is no comment, everywhere, or nowhere, as its setting says |
FR-003 | check | bun run verify | suite/documentation.test.ts: ${name}: the governance tables hold every annotation of the domain and the trace of every table and column; suite/documentation.test.ts: the governance tables are left out by a setting, or by leaving the extension out of the composition |
FR-004 | check | bun run verify | suite/documentation.test.ts: PostgreSQL and DuckDB keep the description of every table and column as a comment, as governance wrote it, and SQLite is given none |
FR-005 | check | bun run verify | suite/documentation.test.ts: the documentation table is made where there is no comment, everywhere, or nowhere, as its setting says |
FR-006 | check | bun run verify | suite/documentation.test.ts: the governance tables are left out by a setting, or by leaving the extension out of the composition |
FR-007 | check | bun run verify | suite/documentation.test.ts: the tables are made by the physical machinery with the naming of the schema, and a table of the schema with their name is an error value |
FR-008 | check | bun run verify | suite/documentation.test.ts: ${name}: a load is whole, run twice it leaves the same rows, and what changed or is gone is not read as current |
FR-009 | check | bun run verify | suite/documentation.test.ts: ${name}: the governance tables hold every annotation of the domain and the trace of every table and column |
0009 SQL features as extensions
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/features.test.ts: the groups run setup first and policy last, and the dialects name the features they have |
FR-002 | check | bun run verify | suite/features.test.ts: the groups run setup first and policy last, and the dialects name the features they have |
FR-003 | check | bun run verify | suite/features.test.ts: a vector is VECTOR(n) after the extension is made on PostgreSQL, FLOAT[n] on DuckDB where it is stored and read back, and refused on SQLite; zero dimensions is an error value |
FR-004 | check | bun run verify | suite/features.test.ts: a partitioned table keeps each row in the partition of its bounds and refuses one that has none |
FR-005 | check | bun run verify | suite/features.test.ts: a view returns the rows its conditions give on all three engines, is made again without error, and has its description as a comment where the dialect has them |
FR-006 | check | bun run verify | suite/features.test.ts: a view returns the rows its conditions give on all three engines, is made again without error, and has its description as a comment where the dialect has them |
FR-007 | check | bun run verify | suite/features.test.ts: a view that names what the schema does not have, shows no column, or is a table's name is an error value naming it, and a statement carries what it reads |
FR-008 | check | bun run verify | suite/features.test.ts: a scoped table shows a role only the rows of its scope and refuses it another's, grants follow the roles, and applying twice leaves the same policies |
FR-009 | check | bun run verify | suite/features.test.ts: a scoped table shows a role only the rows of its scope and refuses it another's, grants follow the roles, and applying twice leaves the same policies |
FR-010 | check | bun run verify | suite/features.test.ts: where the dialect lacks the feature nothing is written and the annotation is left to the governance tables, unless the setting says error |
FR-011 | check | bun run verify | suite/features.test.ts: a routine is made with the names the case style writes, runs on PostgreSQL and returns what its body says, and has a comment with its parameter types |
FR-012 | check | bun run verify | suite/features.test.ts: a routine is made with the names the case style writes, runs on PostgreSQL and returns what its body says, and has a comment with its parameter types |
FR-013 | check | bun run verify | suite/features.test.ts: a routine is made with the names the case style writes, runs on PostgreSQL and returns what its body says, and has a comment with its parameter types |
FR-014 | check | bun run verify | suite/features.test.ts: a partitioned table keeps each row in the partition of its bounds and refuses one that has none |
FR-015 | check | bun run verify | suite/features.test.ts: a division whose key is not a column, is not in the primary key, or whose dialect cannot partition is an error value naming the table |
FR-016 | check | bun run verify | suite/features.test.ts: a vector is VECTOR(n) after the extension is made on PostgreSQL, FLOAT[n] on DuckDB where it is stored and read back, and refused on SQLite; zero dimensions is an error value |
FR-017 | check | bun run verify | suite/features.test.ts: a vector is VECTOR(n) after the extension is made on PostgreSQL, FLOAT[n] on DuckDB where it is stored and read back, and refused on SQLite; zero dimensions is an error value |
FR-018 | check | bun run verify | suite/features.test.ts: a vector is VECTOR(n) after the extension is made on PostgreSQL, FLOAT[n] on DuckDB where it is stored and read back, and refused on SQLite; zero dimensions is an error value; suite/features.test.ts: a view returns the rows its conditions give on all three engines, is made again without error, and has its description as a comment where the dialect has them; suite/features.test.ts: a scoped table shows a role only the rows of its scope and refuses it another's, grants follow the roles, and applying twice leaves the same policies; suite/features.test.ts: a routine is made with the names the case style writes, runs on PostgreSQL and returns what its body says, and has a comment with its parameter types; suite/features.test.ts: a partitioned table keeps each row in the partition of its bounds and refuses one that has none |
FR-019 | check | bun run verify | suite/features.test.ts: a sealed scope is trusted only with the mark of the issuer that holds the key: a session that sets the scope itself, forges its mark or reuses another's sees nothing, cannot read the key or make a mark, and the owner of the table cannot weaken row security without the unlock secret |
FR-020 | check | bun run verify | suite/features.test.ts: with a reach of a set, a sealed scope shows the rows of every tenant it lists, a reseller its tenants and a platform operator every row with the wildcard; without the wildcard `*` is a tenant of no row, and the mark still decides |
0010 Generators
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/generators.test.ts: extensions contribute generators through the engine and generate returns every file in their order, or every error, and a path made twice is an error value |
FR-002 | check | bun run verify | suite/generators.test.ts: the same input gives the same files, each ending in one newline, with names written by the case style and no reading of anything else |
FR-003 | check | bun run verify | suite/generators.test.ts: extensions contribute generators through the engine and generate returns every file in their order, or every error, and a path made twice is an error value |
FR-004 | check | bun run verify | suite/generators.test.ts: the same input gives the same files, each ending in one newline, with names written by the case style and no reading of anything else |
FR-005 | check | bun run verify | suite/generators.test.ts: the Mermaid and D2 diagrams hold every table with its types and key marks and a relationship for each foreign key, and a closed list is an enum |
FR-006 | check | bun run verify | suite/generators.test.ts: the dictionary has each table's description, owner, key and columns with their types, null, target, description and personal data, and the page has the same with links |
FR-007 | check | bun run verify | suite/generators.test.ts: the dictionary has each table's description, owner, key and columns with their types, null, target, description and personal data, and the page has the same with links |
FR-008 | check | bun run verify | suite/generators.test.ts: Rust gets a struct with Options and an enum for a closed list, Zod a schema with nullable and z.enum, and every logical type has a form in both |
FR-009 | check | bun run verify | suite/generators.test.ts: Rust gets a struct with Options and an enum for a closed list, Zod a schema with nullable and z.enum, and every logical type has a form in both |
FR-010 | check | bun run verify | suite/generators.test.ts: the register lists personal data with its category, class and purposes and every classification, access, scope and mask |
FR-011 | check | bun run verify | suite/generators.test.ts: Rust gets a struct with Options and an enum for a closed list, Zod a schema with nullable and z.enum, and every logical type has a form in both |
FR-012 | check | bun run verify | suite/generators.test.ts: a text of governance is escaped for the format it goes into |
FR-013 | check | bun run verify | suite/generators.test.ts: the Zod module validates rows and refuses what does not fit, and the Rust file compiles |
FR-014 | check | bun run verify | suite/generators.test.ts: the files of Arca's party model hold every table, column and foreign key of its logical schema and nothing more |
0011 The lifecycle of a physical schema
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/lifecycle.test.ts: the lifecycle is a unit with a public surface, and its files name no engine |
FR-002 | check | bun run verify | suite/lifecycle.test.ts: a state is a hashed value that is the same for the same structure in any order, and another for another dialect or naming; the hash is the SHA-256 the kernel makes |
FR-003 | check | bun run verify | suite/lifecycle.test.ts: bind marks what it makes as the core's and what an extension adds as the extension's |
FR-004 | check | bun run verify | suite/lifecycle.test.ts: tables and columns are matched by their words, so a change of case style is a rename, and renamedFrom makes a rename of a change of name |
FR-005 | check | bun run verify | suite/lifecycle.test.ts: for any two states the changes of their difference lead from the first to the second, and the difference of a state with itself is empty |
FR-006 | check | bun run verify | suite/lifecycle.test.ts: changes are classified, destructive ones are refused unless allowed, what the dialect cannot do needs a person's step, and all of it is returned together |
FR-007 | check | bun run verify | suite/lifecycle.test.ts: a plan has the ordered steps with the hash of the state each needs and leaves, an identifier made of its content, and none between equal states |
FR-008 | check | bun run verify | suite/lifecycle.test.ts: changes are classified, destructive ones are refused unless allowed, what the dialect cannot do needs a person's step, and all of it is returned together |
FR-009 | check | bun run verify | suite/lifecycle.test.ts: what extensions add is repeatable, with a key and the hash of its text, and only what changed is due; suite/lifecycle.test.ts: what extensions add is applied once and again only when its text changes |
FR-010 | check | bun run verify | suite/lifecycle.test.ts: a ledger whose entry was changed, taken out, put in or moved fails its chain |
FR-011 | check | bun run verify | suite/lifecycle.test.ts: a plan runs on a real engine step by step with the ledger, does nothing run again, refuses another base, rolls a failed step back, and finds a ledger that was touched; suite/lifecycle.test.ts: what extensions add is applied once and again only when its text changes |
FR-012 | check | bun run verify | suite/lifecycle.test.ts: the steps of a plan from empty and then from each version to the next leave the database that bind makes for the last version, with one ledger entry for each step; suite/lifecycle.test.ts: what extensions add is applied once and again only when its text changes |
FR-013 | check | bun run verify | suite/lifecycle.test.ts: for any two states the changes of their difference lead from the first to the second, and the difference of a state with itself is empty |
FR-014 | check | bun run verify | suite/lifecycle.test.ts: the lifecycle vocabulary says what an element was called and when it was made, and lint finds a renamedFrom that is not a name or is the element's own |
0012 Idempotent migrations
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/idempotency.test.ts: a dialect says which forms have IF EXISTS and gives a probe for a table, a column, a constraint and an index that finds it on the engine |
FR-002 | check | bun run verify | suite/idempotency.test.ts: a run skips a guarded statement whose work is done, and the guard is part of the identity of the step |
FR-003 | check | bun run verify | suite/idempotency.test.ts: a statement is natural where the dialect has a form, guarded where it has none, and the step says which |
FR-004 | check | bun run verify | suite/idempotency.test.ts: a statement is natural where the dialect has a form, guarded where it has none, and the step says which |
FR-005 | check | bun run verify | suite/idempotency.test.ts: a step a person wrote relies on the ledger unless it is guarded, and a project can refuse such a step |
FR-006 | check | bun run verify | suite/idempotency.test.ts: the transform is an extension that contributes through lifecycle.transform, is in the default composition, and can be left out or switched off |
FR-007 | check | bun run verify | suite/idempotency.test.ts: a step a person wrote relies on the ledger unless it is guarded, and a project can refuse such a step |
FR-008 | check | bun run verify | suite/idempotency.test.ts: a guarded statement is one block of plain SQL on PostgreSQL that does no harm run twice, and is refused where the dialect has no block |
FR-009 | check | bun run verify | suite/idempotency.test.ts: on three real engines every step can be run twice without the ledger with the result of running it once, and so can a whole plan |