Data (3 of 4)
25 specifications, 149 requirements. All libraries
0031 Operations
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/operations.test.ts: a contract is frozen, and the lint finds a concept that is not there, a query that writes, a bad permission or action, a scope that is not an input, a duplicate, a restricted write as the caller and a silent command |
FR-002 | check | bun run verify | suite/operations.test.ts: a contract is frozen, and the lint finds a concept that is not there, a query that writes, a bad permission or action, a scope that is not an input, a duplicate, a restricted write as the caller and a silent command |
FR-003 | check | bun run verify | suite/operations.test.ts: a runtime needs an implementation for each contract, a contract for each implementation, tables the schema has, and an authorizer and an audit trail where the contract asks for them |
FR-004 | check | bun run verify | suite/operations.test.ts: on three engines typed row operations work by the words of names and a query cannot write, and input that is missing, unknown or of the wrong type is refused before anything is done |
FR-005 | check | bun run verify | suite/operations.test.ts: on three engines typed row operations work by the words of names and a query cannot write, and input that is missing, unknown or of the wrong type is refused before anything is done |
FR-006 | check | bun run verify | suite/operations.test.ts: a caller without the permission gets denied, and the attempt is recorded and kept alone |
FR-007 | check | bun run verify | suite/operations.test.ts: an operation is one transaction: a refusal writes nothing and is not an error, a throw and a write outside the contract and a write with no audit record roll back, and an outcome that must be kept is kept |
FR-008 | check | bun run verify | suite/operations.test.ts: on three engines typed row operations work by the words of names and a query cannot write, and input that is missing, unknown or of the wrong type is refused before anything is done |
FR-009 | check | bun run verify | suite/operations.test.ts: an operation requires a permission or says it is public, and a contract that does neither is found by the lint and refused by the runtime |
0032 Identity principals
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/identity.test.ts: the whole composition binds for each dialect and loads into each real engine, and on every engine a principal of any of the five kinds has a status and an owner that is not itself, and a tenant has a unique slug and is not its own parent |
FR-002 | check | bun run verify | suite/identity.test.ts: the whole composition binds for each dialect and loads into each real engine, and on every engine a principal of any of the five kinds has a status and an owner that is not itself, and a tenant has a unique slug and is not its own parent |
FR-003 | check | bun run verify | suite/identity.test.ts: every kind, status and method of every module is a code list with a definition of each code, closed unless it says it is open |
0033 Identity access
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/identity.test.ts: each module names what it requires, a project composes only what it needs and gets no table of the others, and a module whose requirement is not listed is an error as a value |
FR-002 | check | bun run verify | suite/identity.test.ts: on three engines any kind of principal holds roles once, roles inherit and are separated, attributes of any principal and resource are one value each, policies and relation tuples and the permissions they grant are unique |
FR-003 | check | bun run verify | suite/identity.test.ts: on three engines any kind of principal holds roles once, roles inherit and are separated, attributes of any principal and resource are one value each, policies and relation tuples and the permissions they grant are unique; suite/identity.test.ts: on three engines invitations grant roles once, domains and policies and the audit chain keep what the model says, and a hash in the chain is unique |
FR-004 | check | bun run verify | suite/identity.test.ts: on three engines any kind of principal holds roles once, roles inherit and are separated, attributes of any principal and resource are one value each, policies and relation tuples and the permissions they grant are unique |
0034 Identity ABAC
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/identity.test.ts: on three engines any kind of principal holds roles once, roles inherit and are separated, attributes of any principal and resource are one value each, policies and relation tuples and the permissions they grant are unique |
FR-002 | check | bun run verify | suite/identity.test.ts: on three engines any kind of principal holds roles once, roles inherit and are separated, attributes of any principal and resource are one value each, policies and relation tuples and the permissions they grant are unique |
FR-003 | check | bun run verify | suite/identity.test.ts: on three engines any kind of principal holds roles once, roles inherit and are separated, attributes of any principal and resource are one value each, policies and relation tuples and the permissions they grant are unique |
0035 Identity ReBAC
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/identity.test.ts: on three engines any kind of principal holds roles once, roles inherit and are separated, attributes of any principal and resource are one value each, policies and relation tuples and the permissions they grant are unique |
FR-002 | check | bun run verify | suite/identity.test.ts: on three engines any kind of principal holds roles once, roles inherit and are separated, attributes of any principal and resource are one value each, policies and relation tuples and the permissions they grant are unique |
0036 Identity PKI
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/identity.test.ts: on three engines machines have workload identities, keys and certificates that are unique, and devices have attestations, posture and sessions, all as principals of their kind |
FR-002 | check | bun run verify | suite/identity.test.ts: on three engines machines have workload identities, keys and certificates that are unique, and devices have attestations, posture and sessions, all as principals of their kind |
0037 Identity machines
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/identity.test.ts: on three engines machines have workload identities, keys and certificates that are unique, and devices have attestations, posture and sessions, all as principals of their kind |
FR-002 | check | bun run verify | suite/identity.test.ts: on three engines machines have workload identities, keys and certificates that are unique, and devices have attestations, posture and sessions, all as principals of their kind |
FR-003 | check | bun run verify | suite/identity.test.ts: on three engines machines have workload identities, keys and certificates that are unique, and devices have attestations, posture and sessions, all as principals of their kind; suite/identity.test.ts: no concept of any module holds a secret, a prompt or raw arguments in the clear, every concept that holds a secret is restricted, and an agent's provenance and its calls are kept as pinned versions and hashes |
0038 Identity devices
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/identity.test.ts: on three engines machines have workload identities, keys and certificates that are unique, and devices have attestations, posture and sessions, all as principals of their kind; suite/identity.test.ts: every concept carries a classification and the requirement it cites, what is personal carries its category, and short-lived data says how long it is kept |
FR-002 | check | bun run verify | suite/identity.test.ts: on three engines machines have workload identities, keys and certificates that are unique, and devices have attestations, posture and sessions, all as principals of their kind |
FR-003 | check | bun run verify | suite/identity.test.ts: on three engines machines have workload identities, keys and certificates that are unique, and devices have attestations, posture and sessions, all as principals of their kind |
0039 Identity delegation
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/identity.test.ts: on three engines an agent has an owner, versions that are pinned, tool grants, runs under delegations with the chain kept, budgets that are one per meter and window, calls that are one per index, and approvals bound to arguments |
FR-002 | check | bun run verify | suite/identity.test.ts: on three engines an agent has an owner, versions that are pinned, tool grants, runs under delegations with the chain kept, budgets that are one per meter and window, calls that are one per index, and approvals bound to arguments |
0040 Identity agents
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/identity.test.ts: on three engines an agent has an owner, versions that are pinned, tool grants, runs under delegations with the chain kept, budgets that are one per meter and window, calls that are one per index, and approvals bound to arguments |
FR-002 | check | bun run verify | suite/identity.test.ts: on three engines an agent has an owner, versions that are pinned, tool grants, runs under delegations with the chain kept, budgets that are one per meter and window, calls that are one per index, and approvals bound to arguments; suite/identity.test.ts: no concept of any module holds a secret, a prompt or raw arguments in the clear, every concept that holds a secret is restricted, and an agent's provenance and its calls are kept as pinned versions and hashes |
FR-003 | check | bun run verify | suite/identity.test.ts: on three engines an agent has an owner, versions that are pinned, tool grants, runs under delegations with the chain kept, budgets that are one per meter and window, calls that are one per index, and approvals bound to arguments |
FR-004 | check | bun run verify | suite/identity.test.ts: on three engines an agent has an owner, versions that are pinned, tool grants, runs under delegations with the chain kept, budgets that are one per meter and window, calls that are one per index, and approvals bound to arguments; suite/identity.test.ts: no concept of any module holds a secret, a prompt or raw arguments in the clear, every concept that holds a secret is restricted, and an agent's provenance and its calls are kept as pinned versions and hashes |
0041 Identity authorize
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/identity-operations.test.ts: one decision answers for a person, a group's members and an agent: roles, inheritance and groups permit, a privileged role is never an agent's, entitlements gate, relationships permit, a refusal wins, unknown never allows, and a disabled principal can do nothing; suite/identity-operations.test.ts: what a group passes on reaches a member three groups down and not one six down, and a delegation made in one tenant gives nothing in another though its root holds the role there; suite/identity-operations.test.ts: a permission is for people, machines and groups unless it names the kinds it is for, and a role that names the kinds that may hold it is not held by another kind |
FR-002 | check | bun run verify | suite/identity-operations.test.ts: one decision answers for a person, a group's members and an agent: roles, inheritance and groups permit, a privileged role is never an agent's, entitlements gate, relationships permit, a refusal wins, unknown never allows, and a disabled principal can do nothing |
FR-003 | check | bun run verify | suite/identity-operations.test.ts: one decision answers for a person, a group's members and an agent: roles, inheritance and groups permit, a privileged role is never an agent's, entitlements gate, relationships permit, a refusal wins, unknown never allows, and a disabled principal can do nothing |
FR-004 | check | bun run verify | suite/identity-operations.test.ts: the policy language is a closed tree that answers true, false or unknown, where unknown never allows, and anything that is not an expression is refused |
FR-005 | check | bun run verify | suite/identity-operations.test.ts: a delegation can only attenuate, a delegate can do only what every delegation of its chain passes on and what the person at the root can do now, and revoking one revokes everything below it; suite/identity-operations.test.ts: what a group passes on reaches a member three groups down and not one six down, and a delegation made in one tenant gives nothing in another though its root holds the role there |
FR-006 | check | bun run verify | suite/identity-operations.test.ts: the kill switch switches an agent off at once, and the audit trail is a chain in which a change to an event shows; suite/identity-operations.test.ts: a refused call uses nothing up: an approval is not consumed and no budget is spent when another budget has no room, and an event whose fields were changed shows in the chain though its links are intact |
FR-007 | check | bun run verify | suite/identity-operations.test.ts: a permission is for people, machines and groups unless it names the kinds it is for, and a role that names the kinds that may hold it is not held by another kind |
0042 Identity agent operations
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/identity-operations.test.ts: a delegation can only attenuate, a delegate can do only what every delegation of its chain passes on and what the person at the root can do now, and revoking one revokes everything below it |
FR-002 | check | bun run verify | suite/identity-operations.test.ts: a delegation can only attenuate, a delegate can do only what every delegation of its chain passes on and what the person at the root can do now, and revoking one revokes everything below it |
FR-003 | check | bun run verify | suite/identity-operations.test.ts: a tool call is decided, budgeted and approved in one transaction: a granted tool within a delegation is allowed, a risky one waits for a person who owns the agent and may do it themselves, an approval is for one call and used once, and a budget is never exceeded; suite/identity-operations.test.ts: an approval that has expired cannot be decided or used, an approver who no longer holds the permission cannot approve, and a grant's call limit and end are exact |
FR-004 | check | bun run verify | suite/identity-operations.test.ts: a tool call is decided, budgeted and approved in one transaction: a granted tool within a delegation is allowed, a risky one waits for a person who owns the agent and may do it themselves, an approval is for one call and used once, and a budget is never exceeded; suite/identity-operations.test.ts: a refused call uses nothing up: an approval is not consumed and no budget is spent when another budget has no room, and an event whose fields were changed shows in the chain though its links are intact; suite/identity-operations.test.ts: an approval that has expired cannot be decided or used, an approver who no longer holds the permission cannot approve, and a grant's call limit and end are exact |
FR-005 | check | bun run verify | suite/identity-operations.test.ts: the kill switch switches an agent off at once, and the audit trail is a chain in which a change to an event shows |
FR-006 | check | bun run verify | suite/identity-operations.test.ts: the kill switch switches an agent off at once, and the audit trail is a chain in which a change to an event shows |
FR-007 | check | bun run verify | suite/identity-operations.test.ts: the identity of the actor is the caller's and never what an input says: a forged delegator, decider or killer is refused, no caller is refused, and only the one who answers for an agent, or who may, can switch it off or end a delegation |
0043 Invariants in the database
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/enforcement.test.ts: the vocabulary says a concept is append-only (perhaps as a chain), that a status moves only along its moves and that a number is never above another, and lint finds a member or a code that is not there; suite/identity-operations.test.ts: with the invariants in the database, a statement typed by hand is refused what governance forbids: the audit trail cannot be changed, removed, forked or truncated, a status moves only along its moves, a budget cannot go above its limit, and the operations still work |
FR-002 | check | bun run verify | suite/identity-operations.test.ts: with the invariants in the database, a statement typed by hand is refused what governance forbids: the audit trail cannot be changed, removed, forked or truncated, a status moves only along its moves, a budget cannot go above its limit, and the operations still work |
FR-003 | check | bun run verify | suite/identity-operations.test.ts: with the invariants in the database, a statement typed by hand is refused what governance forbids: the audit trail cannot be changed, removed, forked or truncated, a status moves only along its moves, a budget cannot go above its limit, and the operations still work |
FR-004 | check | bun run verify | suite/identity-operations.test.ts: with the invariants in the database, a statement typed by hand is refused what governance forbids: the audit trail cannot be changed, removed, forked or truncated, a status moves only along its moves, a budget cannot go above its limit, and the operations still work |
FR-005 | check | bun run verify | suite/identity-operations.test.ts: a dialect without triggers is an error value naming what it cannot enforce unless the project says to carry it, and the invariants a schema declares can be listed |
FR-006 | check | bun run verify | suite/enforcement.test.ts: a dialect says what it can enforce in the database (PostgreSQL everything, SQLite checks, keys and triggers, DuckDB checks and keys), and each guarantee is placed in the database or in the application's runtime, with why |
FR-007 | check | bun run verify | suite/identity-operations.test.ts: on PostgreSQL the owner of a table cannot weaken the invariants: dropping, disabling, renaming or replacing a trigger or its function, or dropping the table, is refused unless the session holds the unlock secret, and with the guard left out it is not |
0044 Issues as typed code
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/issues.test.ts: issues are typed values: frozen, and each status carries what it needs |
FR-002 | check | bun run verify | suite/issues.test.ts: every issues folder of the library is kept as it must be: its files named and listed, each issue what its file says, every set sound, and the proof of a fixed issue resolves |
FR-003 | check | bun run verify | suite/issues.test.ts: a set is checked: numbers in order, a slug, a date, a priority that fits the severity, engines, goals, a proof, a reason, a duplicate, links and citations |
FR-004 | check | bun run verify | suite/issues.test.ts: an issue is never lost: taking one out, renaming it or a move the state machine does not allow is found against the version before |
FR-005 | check | bun run verify | suite/issues.test.ts: the issues still to be done are listed most pressing first, and a finished one is not listed |
FR-006 | check | bun run verify | suite/issues.test.ts: every issues folder of the library is kept as it must be: its files named and listed, each issue what its file says, every set sound, and the proof of a fixed issue resolves |
FR-007 | check | bun run verify | suite/enforcement-notes.test.ts: the notes of the table of enforcement are the tests that carry the requirement's tag, and a note that names a test that is not there or does not prove it is found |
FR-008 | check | bun run verify | suite/enforcement-notes.test.ts: every specification of the library is in force, so the trace holds each requirement to a test |
0045 The issues model and its synchronisation
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/issues-sync.test.ts: the issues model composes alone and binds on every dialect |
FR-002 | check | bun run verify | suite/issues-sync.test.ts: a sync adds what is new, rewrites what changed with its goals, engines, evidence and links, and records the run in a ledger |
FR-003 | check | bun run verify | suite/issues-sync.test.ts: a sync adds what is new, rewrites what changed with its goals, engines, evidence and links, and records the run in a ledger |
FR-004 | check | bun run verify | suite/issues-sync.test.ts: an issue the code no longer has is withdrawn and never deleted, and comes back, rewritten where it changed, when the code has it again |
FR-005 | check | bun run verify | suite/issues-sync.test.ts: a sync of records that already match writes nothing, and a failure rolls back everything it did and is a value |
0046 arcactl
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/arcactl-network.test.ts: both clients, Bun's own and pg, connect over a socket and give the report the in-process database gives, and find what is planted in the database through the same connection; suite/arcactl-network.test.ts: each client sends the password of the URL to a server that asks for one and no other, and a connection that fails is said with exit code 2 and without the password; suite/arcactl.test.ts: a password is never printed: it is taken out of any URL or setting in what is said, including the error of a driver, and a failure to connect (to a port nothing listens on) is said with exit code 2 |
FR-002 | check | bun run verify | suite/arcactl.test.ts: the configuration is typed data with defaults, names the models of the arca family (and the issues model), brings what they require with them, and refuses a model, a schema or a list that is not one |
FR-003 | check | bun run verify | suite/arcactl.test.ts: doctor is read-only, gives a result for each check with an exit code of 0 where all pass and 1 where any does not, in text or JSON, and a command that is wrong or a database that cannot be reached is 2 |
FR-004 | check | bun run verify | suite/arcactl.test.ts: doctor says a database is not initialised, finds a missing table, a stray table and column as drift (or as held where the project holds them), and reads the ledger's chain |
FR-005 | check | bun run verify | suite/arcactl.test.ts: doctor says a database is not initialised, finds a missing table, a stray table and column as drift (or as held where the project holds them), and reads the ledger's chain |
FR-006 | check | bun run verify | suite/arcactl.test.ts: doctor finds the invariants weakened: a trigger dropped or disabled, and the guard's event triggers missing or disabled, and does not ask for what the project says it does not want |
FR-007 | check | bun run verify | suite/arcactl.test.ts: doctor finds a seal that an application role could use (the key's table or the mark function open to PUBLIC, the seal's guard missing) and a seal that is wanted and not there |
FR-008 | check | bun run verify | suite/arcactl.test.ts: doctor verifies the audit chain by recomputing it and finds an event whose hash is not its own, and says there is no trail where the models have none |
FR-009 | check | bun run verify | suite/arcactl-network.test.ts: each client sends the password of the URL to a server that asks for one and no other, and a connection that fails is said with exit code 2 and without the password; suite/arcactl.test.ts: a password is never printed: it is taken out of any URL or setting in what is said, including the error of a driver, and a failure to connect (to a port nothing listens on) is said with exit code 2 |
FR-010 | check | bun run verify | suite/arcactl.test.ts: doctor says what PostgreSQL enforces in the database for the models' invariants, and what the application's runtime enforces |
FR-011 | check | bun run verify | suite/arcactl-package.test.ts: the package that is published is named arcactl, has the version of the library, one file as its bin, `pg` as an optional dependency and nothing of the repository's own, the folder's own package.json stays private, and the file is one bundle that holds none of the test tools; suite/arcactl-package.test.ts: the tarball installs into an empty project and its command runs there, on Bun with Bun's own client and on Node with pg, and gives the report the sources give against a database on a socket, and on Node without pg says what to install |
FR-012 | check | bun run verify | suite/arcactl-access.test.ts: scope prints the statement that sets a sealed scope for a tenant, a list, a tenant and those beneath it, or every tenant, for the session or the transaction, and refuses what is not a scope |
FR-013 | check | bun run verify | suite/arcactl-access.test.ts: doctor holds a project's own module as it holds the arca models: sound with the seal in place, and a fault planted in row security is found |
FR-014 | check | bun run verify | suite/arcactl-resolve.test.ts: the target is what psql's variables, the service PGSERVICE names and .pgpass give, the service before the variables, a missing service or host nothing, and no password in what says where it came from; suite/arcactl-resolve.test.ts: a connection that fails does not say the password that was found in a file |
0047 arcactl init and its two models
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/arcactl-workstation.test.ts: the files of a person are found by each platform's own rules and by libpq's own variables where it has them, without touching a file, and a missing home is said |
FR-002 | check | bun run verify | suite/arcactl-workstation.test.ts: a managed block is put in once however often it is asked, replaces itself, leaves everything outside its markers as it was, keeps the line ending, comes out leaving the file as it was, and a file whose markers make no sense is an error and is not changed |
FR-003 | check | bun run verify | suite/arcactl-workstation.test.ts: a change of a file is planned before it is made, is made whole by rename with the file's mode kept and a copy of the first version, writes nothing where there is nothing to change, goes through a symbolic link, and refuses a directory |
FR-004 | check | bun run verify | suite/arcactl-workstation.test.ts: the server model is chosen by what is said (an option, ARCA_MODE), then by the environment (CI, no terminal), and only a person at a terminal gets the workstation, where files are written and questions asked |
FR-005 | check | bun run verify | suite/arcactl-workstation.test.ts: a server run gets its secrets from a variable or from the file a NAME_FILE names, never both, without a trailing line ending, and a URL given so is used and never printed |
FR-006 | check | bun run verify | suite/arcactl-shell.test.ts: each shell's quoting makes any text one word: the known answers of the rules of POSIX shells, fish, PowerShell and nushell, and the real shells hand back what they are given, spaces, quotes, $, backticks and line endings included; suite/arcactl-shell.test.ts: the script sets the instance, the service and the search path, keeps the person's own PGOPTIONS, and is the same sourced twice; suite/arcactl-shell.test.ts: the script is valid for every shell it is made for, is the same each time, holds no password, and the command that prints it connects to nothing, names the shell it is for, and refuses input that would not be safe |
FR-007 | check | bun run verify | suite/arcactl-shell.test.ts: arca-off takes away what the script set and the functions, leaves the person's own variables, and a switch of instance (arca-use, by the real command) replaces what the last one set without carrying its label or service over; suite/arcactl-shell.test.ts: the functions call arcactl with their arguments as they are, and the completions offer the commands, their options and their values; suite/arcactl-shell.test.ts: the script is valid for every shell it is made for, is the same each time, holds no password, and the command that prints it connects to nothing, names the shell it is for, and refuses input that would not be safe |
FR-008 | check | bun run verify | suite/arcactl-libpq.test.ts: `.pgpass` lines escape a colon and a backslash and read back, the file is made 0600, a password is replaced or taken out without touching the person's lines or the other credentials, a line of the person's own that libpq would read first is said, and a credential that cannot be held is refused; suite/arcactl-libpq.test.ts: the real libpq reads what is written to `.pgpass`: each password, whatever it holds, reaches a server that asks for one, a wildcard and an exact line match as libpq reads them, and a file the group can read is ignored until its mode is put right |
FR-009 | check | bun run verify | suite/arcactl-libpq.test.ts: the service file holds the instances in a block, reads them back, refuses a service the person already defined outside it and what is not valid, and the real psql connects by the service, by PGSERVICE as the shell sets it |
FR-010 | check | bun run verify | suite/arcactl-libpq.test.ts: the psqlrc is a block that includes the file arcactl owns, which is quiet at start, names the instance, and gives the helper queries that work on a real database; and undoing takes away what was put in and leaves the person's own |
FR-011 | check | bun run verify | suite/arcactl-init.test.ts: discovery finds the instances from the connection given, libpq's environment, the service file, the hosts `.pgpass` has passwords for, what arcactl knows and (where asked) this machine, makes one of the same place, names it by its service, never takes a wildcard host, drops the password of a URL, and finds the arca.config.ts of an Ergonex workspace; suite/arcactl-init.test.ts: the state is written in a stable order, so that the same state is the same text, and a state file that is not one is said |
FR-012 | check | bun run verify | suite/arcactl-init.test.ts: looking at an instance reads and changes nothing: it says whether it is reached, as whom, what that role could do (read, migrate, migrate and guard) and which arca models it has, and says why it is not reached without the password; suite/arcactl-init.test.ts: init with nothing given shows the instances found with what each could do, a password goes only to the host it is written for, and init sets up the shell and the psql files with no instance at all |
FR-013 | check | bun run verify | suite/arcactl-init.test.ts: init sets up the workstation and no database: the service, the password in .pgpass alone, the psql files and the shell profile, shown first and made only where agreed, the same again changes nothing, and the real psql and a real shell then reach the instance by what was written; suite/arcactl-init.test.ts: init asks a person what it needs and changes nothing they decline, leaves their own lines and the block of Ergonex where they are, uses a service they defined themselves, and undo takes away only what init put in; suite/arcactl-init.test.ts: init is for a workstation: a server run refuses it and writes nothing, an option, a model, a name or a shell that is not valid is refused before anything is written, a URL's password is not shown, and a file whose markers are broken is not changed; suite/arcactl-init.test.ts: init with nothing given shows the instances found with what each could do, a password goes only to the host it is written for, and init sets up the shell and the psql files with no instance at all |
FR-014 | check | bun run verify | suite/arcactl-init.test.ts: init asks a person what it needs and changes nothing they decline, leaves their own lines and the block of Ergonex where they are, uses a service they defined themselves, and undo takes away only what init put in |
FR-015 | check | bun run verify | suite/arcactl-init.test.ts: the workstation checks find what is wrong: psql missing or old, a password file libpq would ignore, a missing service, a stale or changed psql file, a profile whose block or cache is gone or out of date, and an instance that is not reached; and they run as doctor --scope workstation |
0048 sql objects
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/objects.test.ts: on PostgreSQL a sequence counts, an enumerated type refuses a value it does not have, a domain refuses what its rule refuses and a null where it is not null, an extension is made, and making them all again changes nothing; suite/objects.test.ts: on DuckDB a schema, a sequence and an enumerated type are made and made again, and a domain and an extension, which DuckDB does not have, are an error value that names them |
FR-002 | check | bun run verify | suite/objects.test.ts: on PostgreSQL a sequence counts, an enumerated type refuses a value it does not have, a domain refuses what its rule refuses and a null where it is not null, an extension is made, and making them all again changes nothing |
FR-003 | check | bun run verify | suite/objects.test.ts: on DuckDB a schema, a sequence and an enumerated type are made and made again, and a domain and an extension, which DuckDB does not have, are an error value that names them; suite/objects.test.ts: SQLite has none of them: each is an error value that names it, and where the project carries them nothing is written |
FR-004 | check | bun run verify | suite/objects.test.ts: an enumerated type can be made from a closed code list with its values written as the codes are, objects come before the tables, a name is quoted, and the objects are an extension of the engine |
0049 sql assertions
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/assertions.test.ts: the structure a schema's state says is held on each dialect, by a driver and by one query that returns TAP lines, and what a database lacks or has otherwise is a failing line that names it |
FR-002 | check | bun run verify | suite/assertions.test.ts: the structure a schema's state says is held on each dialect, by a driver and by one query that returns TAP lines, and what a database lacks or has otherwise is a failing line that names it |
FR-003 | check | bun run verify | suite/assertions.test.ts: rows are held in any order and compared as sets, a statement that must fail passes only where it is refused and changes nothing where it is not, and the query that gives TAP says a statement that must fail was skipped |
FR-004 | check | bun run verify | suite/assertions.test.ts: TAP is values that are written as TAP version 14 and read back, with a skipped test counted apart from a failure |
FR-005 | check | bun run verify | suite/assertions.test.ts: the assertions are a pgTAP script that the pgTAP extension runs in PostgreSQL, giving the same results as the query and the driver |
0050 sql plpgsql
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/plpgsql.test.ts: a block of typed statements is the body of a routine that is made with the names the case style writes and runs on PostgreSQL: loops, conditions, a handler for a named condition, an error with a state, and rows returned |
FR-002 | check | bun run verify | suite/plpgsql.test.ts: a block of typed statements is the body of a routine that is made with the names the case style writes and runs on PostgreSQL: loops, conditions, a handler for a named condition, an error with a state, and rows returned |
FR-003 | check | bun run verify | suite/plpgsql.test.ts: what is wrong with a block is an error as a value before anything is made: a variable that was not declared or is declared twice, a function that can end without returning, a value returned from a procedure and none from a function, a state that is not one, and a table or column the schema lacks |
0051 project cli
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/arcactl-project.test.ts: sql writes the DDL of the models for a dialect, which PostgreSQL, SQLite and DuckDB each run, with the triggers of the invariants unless they are left out, and for a module of a project's own |
FR-002 | check | bun run verify | suite/arcactl-project.test.ts: sql writes the DDL of the models for a dialect, which PostgreSQL, SQLite and DuckDB each run, with the triggers of the invariants unless they are left out, and for a module of a project's own |
FR-003 | check | bun run verify | suite/arcactl-project.test.ts: lint holds the models and the operations to governance's rules: errors fail it, warnings do not unless it is strict, and a module of a project's own is held to them too |
FR-004 | check | bun run verify | suite/arcactl-access.test.ts: a generator is named by its id or by the short name the usage gives, for a module of the project's own; suite/arcactl-project.test.ts: generate writes what a generator makes for the models, names the generators where it is not given one, and list says what there is |
FR-005 | check | bun run verify | suite/arcactl-project.test.ts: a command that is wrong is refused with exit code 2 before anything is made: no project, both kinds of project, a model that is not one, a dialect that is not one, a module that is not a project, a thing to list that is not one |
FR-006 | check | bun run verify | suite/arcactl-access.test.ts: sql writes the grants and policies, the protected layer, the reach and the seal that its flags ask for, and refuses a seal with no key, a key given as an argument, a reach with no access, and a dialect that has no row security |
0052 sql quality (SQL-DQ)
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/quality.test.ts: a generic test has the level it is written at and the type of its arguments (a test of a column does not go on a model), takes the name dbt gives it, and a selection picks by tag, relation, test and kind and leaves out what it excludes |
FR-002 | check | bun run verify | suite/quality.test.ts: a generic test has the level it is written at and the type of its arguments (a test of a column does not go on a model), takes the name dbt gives it, and a selection picks by tag, relation, test and kind and leaves out what it excludes |
FR-003 | check | bun run verify | suite/quality.test.ts: the status of a number of failures is judged as dbt judges it: severity, warnIf and errorIf |
FR-004 | check | bun run verify | suite/quality.test.ts: the status of a number of failures is judged as dbt judges it: severity, warnIf and errorIf |
FR-005 | check | bun run verify | suite/quality.test.ts: the built-in and the package tests, on each engine, count the rows that are wrong and pass where there are none |
FR-006 | check | bun run verify | suite/quality.test.ts: the built-in and the package tests, on each engine, count the rows that are wrong and pass where there are none |
FR-007 | check | bun run verify | suite/quality.test.ts: where, limit, failCalc and stored failures: the tests are looked at through the filter, the failing rows are counted up to the limit or by the expression, and stored as a table or a view that a second run replaces |
FR-008 | check | bun run verify | suite/quality.test.ts: a test that cannot run is an error, not a pass; the results are counted, good where nothing failed and nothing erred (a warning is not a failure), and told as TAP |
FR-009 | check | bun run verify | suite/quality.test.ts: the tests a schema's state asks for (not null, keys, codes) pass on a database that holds the schema and fail on one that was loaded around it |
FR-010 | check | bun run verify | suite/quality.test.ts: a test can expect an exact number of failing rows (it fails on one fewer and on one more and is never a warning), and a set of proposed tests is previewed on the data that is already there, with a sample of the rows each would reject, changing nothing |
FR-011 | check | bun run verify | suite/quality.test.ts: a test can expect an exact number of failing rows (it fails on one fewer and on one more and is never a warning), and a set of proposed tests is previewed on the data that is already there, with a sample of the rows each would reject, changing nothing |
0053 sql-typed
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/typed.test.ts: expressions give the type of what they compute and only compile for the types they fit: a number is not compared with a text, a name is not summed, a null is asked with isNull, and a column that may be null is a nullable expression |
FR-002 | check | bun run verify | suite/typed.test.ts: expressions give the type of what they compute and only compile for the types they fit: a number is not compared with a text, a name is not summed, a null is asked with isNull, and a column that may be null is a nullable expression |
FR-003 | check | bun run verify | suite/typed.test.ts: a table has a typed column for each key of its row, the keys are the names a program writes and the names in SQL are those the table says, a table can be known by another name and put in another schema |
FR-004 | check | bun run verify | suite/typed.test.ts: a select with joins (inner, left, right, full, cross), conditions, groups, having, order, limit, offset and distinct gives rows of the type it names, on SQLite, DuckDB and PostgreSQL; an outer join makes the columns of the other side nullable |
FR-005 | check | bun run verify | suite/typed.test.ts: a select with joins (inner, left, right, full, cross), conditions, groups, having, order, limit, offset and distinct gives rows of the type it names, on SQLite, DuckDB and PostgreSQL; an outer join makes the columns of the other side nullable; suite/typed.test.ts: set operations, subqueries (in, not in, exists, a value), common table expressions, derived tables and a table joined to itself under another name run on each engine, and a name used twice in one query is refused |
FR-006 | check | bun run verify | suite/typed.test.ts: every value is written by the dialect as a literal, so a quote in a text is doubled and cannot become SQL; a date is written as text; a number that is not finite, and bytes, are an error value; an empty list is false and an empty and is true |
FR-007 | check | bun run verify | suite/typed.test.ts: insert (one row and many, with what the database fills left out), upsert (do nothing, do update with the proposed value), update with values and expressions, delete and returning run on each engine; an update or a delete cannot be run until it says where or all, and a row of other columns than the first is refused |
FR-008 | check | bun run verify | suite/typed.test.ts: the typed tables of each model are what the models say (none stale, missing or stray), every table of every model is owned by one, and the row types name the columns that a database made from the models has |
FR-009 | check | bun run verify | suite/typed.test.ts: the typed tables of each model are what the models say (none stale, missing or stray), every table of every model is owned by one, and the row types name the columns that a database made from the models has |
0054 sql-loads
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/loads.test.ts: sources give rows in batches: CSV with quoted cells, doubled quotes, line breaks inside quotes, a byte order mark and typed cells; a line that does not read is rejected with its line and why; lines of JSON; rows; and a select |
FR-002 | check | bun run verify | suite/loads.test.ts: sources give rows in batches: CSV with quoted cells, doubled quotes, line breaks inside quotes, a byte order mark and typed cells; a line that does not read is rejected with its line and why; lines of JSON; rows; and a select |
FR-003 | check | bun run verify | suite/loads.test.ts: an extract is CSV with a header and quoted cells where they need it, or lines of JSON, and a CSV that is extracted is read again to the same rows |
FR-004 | check | bun run verify | suite/loads.test.ts: a load in each mode: append fails on a key that is there and leaves the table as it was, skip-existing keeps the rows that are there, upsert changes them, replace empties the table first; batches, one transaction, and a row of the ledger for each run |
FR-005 | check | bun run verify | suite/loads.test.ts: ELT: the rows go to a staging table, SQL-DQ tests run on it, and only a load that passes is merged; one that does not leaves the target as it was, reports the failures, and drops the staging table unless it is asked to keep it |
FR-006 | check | bun run verify | suite/loads.test.ts: the lines that are rejected are reported by line, a load is refused and takes nothing where more than the share that is allowed was rejected, and a load with some rejected lines takes the rest |
FR-007 | check | bun run verify | suite/loads.test.ts: a load keeps the greatest value of a column as its high-water mark, the next run reads from it, and a load that did not load does not move it |
FR-008 | check | bun run verify | suite/loads.test.ts: a select of one database is loaded into a table of another, through a gate, on every pair of engines: rows are copied, counted and recorded in the target's ledger |
FR-009 | check | bun run verify | suite/loads.test.ts: a load can give the run's id to every row it writes, so that what a load wrote is found by it, and with divertConflicts a key that is there is not a failure: the same content is absorbed and counted, other content goes to the conflict table and the original is left as it was |
0055 sql-introspect
| Requirement | Mechanism | Who | Note |
|---|---|---|---|
FR-001 | check | bun run verify | suite/introspect.test.ts: a database made from a model is read back as what the model says: every table, column, nullability, primary key, foreign key, unique constraint and index, on each engine, and the drift from the model is none; suite/introspect.test.ts: composite keys, unique constraints, indexes, foreign keys over more than one column and defaults are read as they were written, on each engine |
FR-002 | check | bun run verify | suite/introspect.test.ts: a database made from a model is read back as what the model says: every table, column, nullability, primary key, foreign key, unique constraint and index, on each engine, and the drift from the model is none |
FR-003 | check | bun run verify | suite/introspect.test.ts: drift names what differs: a table or column that is missing or stray, a type of another family, a nullability, a key, a foreign key, a unique or an index that is missing; a database of another version of the model, and one that was changed by hand, are told apart |
FR-004 | check | bun run verify | suite/introspect.test.ts: a database that was not modelled is adopted as a logical schema that makes the same database again on its own engine, and on each of the others; a type of no known family is an error that names it |