{
"version": 1,
"import": {
"root": "/mnt/c/Users/barlo/projects/drydock/uat/LayersTesting/runs/20261020.191708/sources",
"format": "markdown"
},
"sources": {
"INSTRUCTIONS.md": {
"state": "current",
"versions": [
{
"commit": "1a1586b",
"date": "2026-10-20",
"hash": "4114dd7bb69adc18a2f2731dc801cf5eb4454e6c743b5d25cdade0dca7ba1683",
"release": "",
"state": "consumed",
"via": "plan",
"ticket": null,
"requirements": [
{
"name": "ledger-executable",
"text": "The product is an executable named `ledger` at the application root.",
"stories": []
},
{
"name": "relational-persistence",
"text": "It stores everything in a relational database through the shipped persistence library, and every command either completes in full or changes nothing.",
"stories": []
},
{
"name": "database-configuration",
"text": "`DATABASE_URL` names the database. A value beginning `postgres://` or `postgresql://` is a PostgreSQL DSN. Any other value is a SQLite file path, optionally prefixed `sqlite://`. When `DATABASE_URL` is unset, `DATABASE_PATH` is used, then `data/app.db`.",
"stories": [
"database-configuration"
]
},
{
"name": "ledger-schema",
"text": "Three tables. Amounts are stored as integer cents and never as floating point.",
"stories": [
"database-schema"
]
},
{
"name": "command-dispatch-and-output",
"text": "Every successful command except `init` writes CSV to standard output: one header row, then data rows, comma-separated, no quoting, no trailing spaces, `\\n` line endings. `init` writes nothing. A failing command writes nothing to standard output and one diagnostic line to standard error.",
"stories": [
"cli-dispatch"
]
},
{
"name": "validate-command-usage",
"text": "| `2` | Usage error: unknown command, unknown table or report, wrong argument count. |",
"stories": [
"cli-validation"
]
},
{
"name": "atomic-rejected-commands",
"text": "1. **A rejected command changes nothing.** A command checks every input and rule before\n its\n first write. A load that rejects row 11 stores none of rows 1 to 10. A transfer stores both of\n its rows or neither.",
"stories": [
"account-loading",
"transaction-loading",
"balance-invariant",
"transfers"
]
},
{
"name": "load-accounts-and-categories",
"text": "| `ledger load <table> <csv>` | Loads `accounts`, `categories`, or `transactions` from a file whose header matches the table's columns in the order above. Writes `table,loaded` and `<table>,<rows>`. |",
"stories": [
"account-loading"
]
},
{
"name": "load-transactions",
"text": "A loaded transaction keeps the `txn_id` from its file.",
"stories": [
"transaction-loading"
]
},
{
"name": "account-management",
"text": "| `ledger account add <code> <name>` | The new account row. |\n| `ledger account get <code>` | The account row. |\n| `ledger account rename <code> <name>` | The updated account row. |\n| `ledger account delete <code>` | `deleted` and the code. Refused while the account has transactions. |",
"stories": [
"account-management"
]
},
{
"name": "transaction-management",
"text": "| `ledger txn post <account> <category> <amount> <date> [<memo>]` | The new transaction row. |\n| `ledger txn get <id>` | The transaction row. |\n| `ledger txn amend <id> <amount>` | The updated transaction row. Only the amount changes. |\n| `ledger txn delete <id>` | `deleted` and the id. |",
"stories": [
"transaction-management"
]
},
{
"name": "non-negative-balances",
"text": "2. **No command leaves an account balance below zero.** An account's balance is the sum of its\n transaction amounts. Posting, amending, deleting, transferring, and loading are all subject to\n this rule, checked before the command writes anything.",
"stories": [
"balance-invariant"
]
},
{
"name": "transfers",
"text": "| `ledger transfer <from> <to> <amount> <date>` | Two transaction rows in category `TRANSFER`: `-amount` on `<from>` with memo `transfer to <to>`, then `+amount` on `<to>` with memo `transfer from <from>`. The amount is positive and the accounts differ. |",
"stories": [
"transfers"
]
},
{
"name": "balance-report",
"text": "| `ledger report balances` | `account,name,transactions,balance` per account ordered by code, then `TOTAL,,<count>,<sum>`. |",
"stories": [
"balance-report"
]
},
{
"name": "category-report",
"text": "| `ledger report categories` | `category,description,transactions,inflow,outflow,net` per category ordered by code, including categories with no transactions, then `TOTAL,,<count>,<inflow>,<outflow>,<net>`. |",
"stories": [
"category-report"
]
},
{
"name": "monthly-report",
"text": "| `ledger report monthly` | `month,transactions,inflow,outflow,net` per `YYYY-MM` that has transactions, ascending, then `TOTAL,<count>,<inflow>,<outflow>,<net>`. |",
"stories": [
"monthly-report"
]
},
{
"name": "automated-project-tests",
"text": "The completed application provides a POSIX-compatible `bin/test.sh` that runs its own automated\ntest suite from the application root and exits zero only when every test passes. The suite\ncovers each command, each exit code, and each rule above against a real temporary database.",
"stories": [
"project-tests"
]
},
{
"name": "conformance-harness",
"text": "`sources/run.sh` is the scoring entry point. It is supplied, not authored, and is staged verbatim\ninto the application root with the seed files. `drydock uat` runs `sh sources/run.sh` from the\ncompleted application root and takes its exit code and output as the score.",
"stories": [
"conformance"
]
}
]
}
]
},
"run.sh": {
"state": "current",
"versions": [
{
"commit": "1a1586b",
"date": "2026-10-20",
"hash": "744a2165699ea832a9b8679b0dc2792664336184ec88d63045829c969f6d1639",
"release": "",
"state": "consumed",
"via": "plan",
"ticket": null,
"requirements": [
{
"name": "ledger-executable",
"text": "The deliverable is an executable named ledger at the application root.",
"stories": []
},
{
"name": "database-configuration",
"text": "Database: DATABASE_URL when the caller sets it (for example a PostgreSQL DSN), otherwise a SQLite file in a fresh temporary directory.",
"stories": []
},
{
"name": "schema-lifecycle",
"text": "Every run starts with `ledger init`, so the grader never depends on prior state.",
"stories": [
"database-schema"
]
},
{
"name": "bulk-load-dataset",
"text": "Bulk load of the known dataset",
"stories": [
"account-loading",
"transaction-loading"
]
},
{
"name": "balance-reporting",
"text": "Reports over the seeded rows",
"stories": [
"balance-report"
]
},
{
"name": "category-reporting",
"text": "Reports over the seeded rows",
"stories": [
"category-report"
]
},
{
"name": "monthly-reporting",
"text": "Reports over the seeded rows",
"stories": [
"monthly-report"
]
},
{
"name": "atomic-rejected-loads",
"text": "A rejected load changes nothing",
"stories": [
"account-loading",
"transaction-loading"
]
},
{
"name": "account-management",
"text": "Account create, read, update, delete",
"stories": [
"account-management"
]
},
{
"name": "transaction-management",
"text": "Transaction create, read, update, delete",
"stories": [
"transaction-management"
]
},
{
"name": "safe-transfers",
"text": "Transfers are atomic; no command leaves a negative balance",
"stories": [
"balance-invariant",
"transfers"
]
},
{
"name": "usage-errors",
"text": "Usage errors",
"stories": [
"cli-validation"
]
},
{
"name": "reinitialization",
"text": "Re-initialization drops every row",
"stories": [
"database-schema"
]
},
{
"name": "conformance",
"text": "Exit 0 only when every check passes.",
"stories": [
"conformance"
]
}
]
}
]
},
"seed_accounts.csv": {
"state": "current",
"versions": [
{
"commit": "1a1586b",
"date": "2026-10-20",
"hash": "48f83f688324264fd811a0a363418c867454043e30ce02bc8bc81683ed28625b",
"release": "",
"state": "consumed",
"via": "plan",
"ticket": null,
"requirements": [
{
"name": "seed-accounts",
"text": "account,name\nDRAWER1,Front Drawer\nDRAWER2,Back Drawer\nPETTY,Petty Cash\nSAFE,Store Safe",
"stories": [
"account-loading"
]
}
]
}
]
},
"seed_categories.csv": {
"state": "current",
"versions": [
{
"commit": "1a1586b",
"date": "2026-10-20",
"hash": "265d594bf154ef991105beec15a61241f46bb2b330aff215f9bffad2a0602b43",
"release": "",
"state": "consumed",
"via": "plan",
"ticket": null,
"requirements": [
{
"name": "seed-categories",
"text": "category,description\nOPENING,Opening balance\nPAYROLL,Payroll\nREFUND,Customer refunds\nRENT,Rent\nSALES,Sales receipts\nSUPPLY,Supplies\nTRANSFER,Internal transfer",
"stories": [
"account-loading"
]
}
]
}
]
},
"seed_transactions.csv": {
"state": "current",
"versions": [
{
"commit": "1a1586b",
"date": "2026-10-20",
"hash": "c208c69039e28ebe36c868726a0ed8e3ce5e11d54bb52d636a952631446038da",
"release": "",
"state": "consumed",
"via": "plan",
"ticket": null,
"requirements": [
{
"name": "load-seed-transactions",
"text": "txn_id,date,account,category,amount,memo",
"stories": [
"database-schema",
"transaction-loading"
]
},
{
"name": "record-account-transactions",
"text": "1,2026-01-01,SAFE,OPENING,5000.00,opening float",
"stories": [
"transaction-management"
]
},
{
"name": "execute-transfers",
"text": "27,2026-01-14,DRAWER1,TRANSFER,-1000.00,transfer to SAFE\n28,2026-01-14,SAFE,TRANSFER,1000.00,transfer from DRAWER1",
"stories": [
"transfers"
]
}
]
}
]
},
"seed_transactions_bad.csv": {
"state": "current",
"versions": [
{
"commit": "1a1586b",
"date": "2026-10-20",
"hash": "a7cffd87094d0bec741438e34dd8992f893d2e93ec0d32dad8395502d4b5af46",
"release": "",
"state": "consumed",
"via": "plan",
"ticket": null,
"requirements": [
{
"name": "load-transaction-csv",
"text": "txn_id,date,account,category,amount,memo\n201,2026-04-01,DRAWER1,SALES,10.00,bad batch 1\n202,2026-04-01,DRAWER1,SALES,10.00,bad batch 2\n203,2026-04-01,DRAWER1,SALES,10.00,bad batch 3\n204,2026-04-01,DRAWER1,SALES,10.00,bad batch 4\n205,2026-04-01,DRAWER1,SALES,10.00,bad batch 5\n206,2026-04-01,DRAWER1,SALES,10.00,bad batch 6\n207,2026-04-01,DRAWER1,SALES,10.00,bad batch 7\n208,2026-04-01,DRAWER1,SALES,10.00,bad batch 8\n209,2026-04-01,DRAWER1,SALES,10.00,bad batch 9\n210,2026-04-01,DRAWER1,SALES,10.00,bad batch 10",
"stories": [
"transaction-loading"
]
},
{
"name": "reject-unknown-account",
"text": "211,2026-04-01,NOSUCH,SALES,10.00,unknown account",
"stories": [
"transaction-loading"
]
}
]
}
]
}
}
}
Run artifact