Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ The code base also includes a custom scripting language in a file called `Scrimp

The codebase also includes static library build scrips in a file called `Compressor`. This is used to build the static libraries used by the project. This is a very important part of the project.

The codebase also includes `Linux`, the headless engine's build (`docs/developers/build/linux.md` §9): a Docker image that builds libobjc2, GNUstep and the C libraries from pinned sources, compiles all twelve headless frameworks against them, and runs their ported suites — 130 suites, 1,313 tests (`./Linux/build.sh`), plus the CLI. It proves the environment for the headless engine; nothing there ships in the app. See `Linux/README.md`.
The codebase also includes `Linux`, the headless engine's build (`docs/developers/build/linux.md` §9): a Docker image that builds libobjc2, GNUstep and the C libraries from pinned sources, compiles all twelve headless frameworks against them, and runs their ported suites — 130 suites, 1,313 tests (`./Linux/build.sh`, measured 2026-11-20), plus the CLI. It proves the environment for the headless engine; nothing there ships in the app. See `Linux/README.md`.

## Code Style Guidance

Expand Down Expand Up @@ -141,17 +141,22 @@ exact end-to-end sequence without needing the user to spell out each step:

## Testing

Each framework has one test target, exposed by a shared scheme of the same name. Run a
suite against an iOS Simulator:
Each framework has one test target, exposed by a shared scheme of the same name. Pick an
available simulator, then run the suite against it:

xcrun simctl list devices available

# Use a UDID from the list above.
xcodebuild test -workspace Reports.xcworkspace -scheme MADFoundation \
-destination 'platform=iOS Simulator,id=94952340-7629-4EBB-BBD3-6FEE068793B8' \
-derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-cozeiyczmvgrbeapplwfuygymqci
-destination 'platform=iOS Simulator,id=<device-udid>' \
-derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-shared

The destination is pinned by device id, not name: `OS:latest` resolves to the newest
installed runtime (iOS 27.0), which has no iPhone 17 Pro device (26.0/26.1/26.5 do), so
the `name=iPhone 17 Pro` form fails with exit code 70. The shared DerivedData path is
required -- the frameworks reference each other via `BUILT_PRODUCTS_DIR`.
Choose the destination by device id from `simctl`, not by a device name: a name is only
valid on the runtimes that contain that device, so the `name=...` form fails with exit
code 70 when the newest installed runtime does not offer it. Every framework suite must
use the same `-derivedDataPath` -- the frameworks reference each other via
`BUILT_PRODUCTS_DIR`, so a per-suite or per-invocation path breaks the build.
`Reports-shared` is the shared path the project documents (`CONTRIBUTING.md`).

`MADMySQL`, `MADTdsClient`, and `MADPostgres` each carry a second file -- `MADMySQLLiveTests.m`,
`MADTdsClientLiveTests.m`, and `MADPostgresLiveTests.m` -- that talks to a real database server and **skips** when one is
Expand Down Expand Up @@ -190,7 +195,7 @@ the headless side.
documented but deliberately not built.
* `docs/vision.md` -- the public statement of the direction: a report is a table; reports as
composable data sources, one document spanning several databases, documented but
deliberately not built (the design behind it is `MAD_DATA_OBJECT.md`).
deliberately not built (the design behind it is `docs/developers/data-object.md`).
* `docs/index.md` -- the developer site's landing page; GitHub Pages serves `docs/` via Jekyll
(`_config.yml`, `docs/CNAME`, `docs/robots.txt`), live once the repository is public.
* `docs/project/design/MAD_SCRIPTING.md` -- the Scrimpter revival analysis: the state and correctness audit of
Expand Down
2 changes: 1 addition & 1 deletion Linux/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The headless engine's Linux build (see [`MAD_LINUX.md`](../docs/developers/build/linux.md) §9 and
this directory's [`README.md`](README.md)). One Docker image builds libobjc2,
libdispatch, GNUstep and the C libraries the frameworks link from pinned
sources on Ubuntu 24.04, compiles all eleven headless frameworks against them,
sources on Ubuntu 24.04, compiles all twelve headless frameworks against them,
and runs their suites. Nothing here ships in the app; the CLI is Phase D's
checkpoint, and Phase F's runtime image (`mad-cli:latest` locally, published
as `ghcr.io/mthomason/mad`) is how it is run.
Expand Down
5 changes: 3 additions & 2 deletions MAD/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ When performing asynchronous tasks related to documents or data, look for an exi
## Testing and Reports

* **Tests**: `MAD/MADTests`. Run with
`xcodebuild test -workspace Reports.xcworkspace -scheme MAD -destination 'platform=iOS Simulator,name=iPhone 17 Pro'`.
`xcodebuild test -workspace Reports.xcworkspace -scheme MAD -destination 'platform=iOS Simulator,id=<device-udid>' -derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-shared`.
Pick `<device-udid>` from `xcrun simctl list devices available`; see the root [`AGENTS.md`](../AGENTS.md) § Testing.
* **Known issues**: [`BUGS.md`](../docs/project/registers/BUGS.md) -- see the `## MAD (framework)` section.
* **Task queue**: [`TASKS.md`](../docs/project/registers/TASKS.md) -- maintain it, but do not start work from it.
* **Architecture**: [`MADDataTable_Architecture_Report.md`](../docs/developers/architecture/data-table.md).
* **Architecture**: [`data-table.md`](../docs/developers/architecture/data-table.md).
3 changes: 2 additions & 1 deletion MADAPI/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ When you need to interact with a database, you should use the classes and protoc
## Testing and Reports

* **Tests**: `MADAPI/MADAPITests`. Run with
`xcodebuild test -workspace Reports.xcworkspace -scheme MADAPI -destination 'platform=iOS Simulator,name=iPhone 17 Pro'`.
`xcodebuild test -workspace Reports.xcworkspace -scheme MADAPI -destination 'platform=iOS Simulator,id=<device-udid>' -derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-shared`.
Pick `<device-udid>` from `xcrun simctl list devices available`; see the root [`AGENTS.md`](../AGENTS.md) § Testing.
* **Known issues**: [`BUGS.md`](../docs/project/registers/BUGS.md) -- see the `## MADAPI` section.
* **Task queue**: [`TASKS.md`](../docs/project/registers/TASKS.md) -- maintain it, but do not start work from it.
3 changes: 2 additions & 1 deletion MADBarcodes/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The framework is the app's barcode generator: the designer's element picker crea

* **Tests**: `MADBarcodes/MADBarcodesTests`, exposed by the shared `MADBarcodes`
scheme. Run with
`xcodebuild test -workspace Reports.xcworkspace -scheme MADBarcodes -destination 'platform=iOS Simulator,id=94952340-7629-4EBB-BBD3-6FEE068793B8' -derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-cozeiyczmvgrbeapplwfuygymqci`.
`xcodebuild test -workspace Reports.xcworkspace -scheme MADBarcodes -destination 'platform=iOS Simulator,id=<device-udid>' -derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-shared`;
take `<device-udid>` from `xcrun simctl list devices available` and see the root [`AGENTS.md`](../AGENTS.md) § Testing.
The headless half is `Linux/Tests/MADBarcodesTests.m` (the factory, the name table and `-renderedPNGData`), run by both `./Linux/build.sh` and `Windows/Engine/build.ps1`.
* **Tracking**: [`BUGS.md`](../docs/project/registers/BUGS.md) -- the defect register; [`TASKS.md`](../docs/project/registers/TASKS.md) -- the engineering queue. Maintain them, but do not start work from them.
3 changes: 2 additions & 1 deletion MADCocoaExtensions/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ When you need to create or modify UI elements, consult this framework first. It
## Testing and Reports

* **Tests**: `MADCocoaExtensions/MADCocoaExtensionsTests`. Run with
`xcodebuild test -workspace Reports.xcworkspace -scheme MADCocoaExtensions -destination 'platform=iOS Simulator,name=iPhone 17 Pro'`.
`xcodebuild test -workspace Reports.xcworkspace -scheme MADCocoaExtensions -destination 'platform=iOS Simulator,id=<device-udid>' -derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-shared`.
Pick `<device-udid>` from `xcrun simctl list devices available`; see the root [`AGENTS.md`](../AGENTS.md) § Testing.
* **Known issues**: [`BUGS.md`](../docs/project/registers/BUGS.md) -- see the `## MADCocoaExtensions` section.
* **Task queue**: [`TASKS.md`](../docs/project/registers/TASKS.md) -- maintain it, but do not start work from it.
3 changes: 2 additions & 1 deletion MADDataStructures/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ When you need to work with complex data relationships or implement algorithms, c
## Testing and Reports

* **Tests**: `MADDataStructures/MADDataStructuresTests`. Run with
`xcodebuild test -workspace Reports.xcworkspace -scheme MADDataStructures -destination 'platform=iOS Simulator,name=iPhone 17 Pro'`.
`xcodebuild test -workspace Reports.xcworkspace -scheme MADDataStructures -destination 'platform=iOS Simulator,id=<device-udid>' -derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-shared`.
Pick `<device-udid>` from `xcrun simctl list devices available`; see the root [`AGENTS.md`](../AGENTS.md) § Testing.
* **Tracking**: [`BUGS.md`](../docs/project/registers/BUGS.md) -- the defect register; [`TASKS.md`](../docs/project/registers/TASKS.md) -- the engineering queue. Maintain them, but do not start work from them.
5 changes: 3 additions & 2 deletions MADDesigner/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ The project defines four targets:
```sh
xcodebuild test -workspace Reports.xcworkspace -scheme "MAD Designer" \
-only-testing:MADDesignerUnitTests \
-destination 'platform=iOS Simulator,id=94952340-7629-4EBB-BBD3-6FEE068793B8' \
-derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-cozeiyczmvgrbeapplwfuygymqci
-destination 'platform=iOS Simulator,id=<device-udid>' \
-derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-shared
```
Pick `<device-udid>` from `xcrun simctl list devices available`; see the root [`AGENTS.md`](../AGENTS.md) § Testing.
* **Unit test files**:
* `MADDesignerUnitTests.m` -- the app-source helper categories (Base64, RFC 3339 date
formatting), framework consumption, designer/viewer controller regressions, and
Expand Down
3 changes: 2 additions & 1 deletion MADExplorer/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ If you need to add a new file storage location to the application, you will need
## Testing and Reports

* **Tests**: `MADExplorer/MADExplorerTests`. Run with
`xcodebuild test -workspace Reports.xcworkspace -scheme MADExplorer -destination 'platform=iOS Simulator,name=iPhone 17 Pro'`.
`xcodebuild test -workspace Reports.xcworkspace -scheme MADExplorer -destination 'platform=iOS Simulator,id=<device-udid>' -derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-shared`.
Pick `<device-udid>` from `xcrun simctl list devices available`; see the root [`AGENTS.md`](../AGENTS.md) § Testing.
* **Known issues**: [`BUGS.md`](../docs/project/registers/BUGS.md) -- see the `## MADExplorer` section.
* **Task queue**: [`TASKS.md`](../docs/project/registers/TASKS.md) -- maintain it, but do not start work from it.
4 changes: 1 addition & 3 deletions MADFeedback/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,5 @@ If you do decide to use this framework, you will need to initialize the `MADFeed

## Testing and Reports

* **Tests**: `MADFeedback/MADFeedbackTest`. Run with
`xcodebuild test -workspace Reports.xcworkspace -scheme None -destination 'platform=iOS Simulator,name=iPhone 17 Pro'`.
* **Tests**: `MADFeedback/MADFeedbackTest`. The test target is in the Xcode project, but the shared `MADFeedback` scheme has no test action, so no scheme runs it.
* **Tracking**: [`BUGS.md`](../docs/project/registers/BUGS.md) -- the defect register; [`TASKS.md`](../docs/project/registers/TASKS.md) -- the engineering queue. Maintain them, but do not start work from them.
* **Note**: the test target is in the Xcode project but no shared scheme runs it.
3 changes: 2 additions & 1 deletion MADFileManager/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ If you need to support a new file storage location (e.g., a different cloud serv
## Testing and Reports

* **Tests**: `MADFileManager/MADFileManagerTests`. Run with
`xcodebuild test -workspace Reports.xcworkspace -scheme MADFileManager -destination 'platform=iOS Simulator,name=iPhone 17 Pro'`.
`xcodebuild test -workspace Reports.xcworkspace -scheme MADFileManager -destination 'platform=iOS Simulator,id=<device-udid>' -derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-shared`.
Pick `<device-udid>` from `xcrun simctl list devices available`; see the root [`AGENTS.md`](../AGENTS.md) § Testing.
* **Known issues**: [`BUGS.md`](../docs/project/registers/BUGS.md) -- see the `## MADFileManager` section.
* **Task queue**: [`TASKS.md`](../docs/project/registers/TASKS.md) -- maintain it, but do not start work from it.
5 changes: 3 additions & 2 deletions MADFoundation/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ When working with any other framework in this project, it is highly likely that
## Testing and Reports

* **Tests**: `MADFoundation/MADFoundationTests`. Run with
`xcodebuild test -workspace Reports.xcworkspace -scheme MADFoundation -destination 'platform=iOS Simulator,name=iPhone 17 Pro'`.
`xcodebuild test -workspace Reports.xcworkspace -scheme MADFoundation -destination 'platform=iOS Simulator,id=<device-udid>' -derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-shared`.
Pick `<device-udid>` from `xcrun simctl list devices available`; see the root [`AGENTS.md`](../AGENTS.md) § Testing.
* **Known issues**: [`BUGS.md`](../docs/project/registers/BUGS.md) -- see the `## MADFoundation` section.
* **Task queue**: [`TASKS.md`](../docs/project/registers/TASKS.md) -- maintain it, but do not start work from it.
* **Architecture**: [`MADDataTable_Architecture_Report.md`](../docs/developers/architecture/data-table.md).
* **Architecture**: [`data-table.md`](../docs/developers/architecture/data-table.md).
5 changes: 3 additions & 2 deletions MADMySQL/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ This framework, along with `MADTdsClient`, serves as a good example of how to ad
## Testing and Reports

* **Tests**: `MADMySQL/MADMySQLTests`. Run with
`xcodebuild test -workspace Reports.xcworkspace -scheme MADMySQL -destination 'platform=iOS Simulator,name=iPhone 17 Pro'`.
`xcodebuild test -workspace Reports.xcworkspace -scheme MADMySQL -destination 'platform=iOS Simulator,id=<device-udid>' -derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-shared`.
Pick `<device-udid>` from `xcrun simctl list devices available`; see the root [`AGENTS.md`](../AGENTS.md) § Testing.
* **Known issues**: [`BUGS.md`](../docs/project/registers/BUGS.md) -- see the `## MADMySQL` section.
* **Task queue**: [`TASKS.md`](../docs/project/registers/TASKS.md) -- maintain it, but do not start work from it.
* **Architecture**: [`MADDataTable_Architecture_Report.md`](../docs/developers/architecture/data-table.md).
* **Architecture**: [`data-table.md`](../docs/developers/architecture/data-table.md).
* **Live tests**: `MADMySQLTests/MADMySQLLiveTests.m` talks to a real MySQL server
and skips when none is reachable. The credentials it expects are in
[`DEVELOPER.md`](../docs/project/build/DEVELOPER.md); override them with the `MAD_MYSQL_TEST_*`
Expand Down
3 changes: 2 additions & 1 deletion MADPostgres/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ The `MADPostgres` framework provides the PostgreSQL implementation of `MADDataba
## Testing and Reports

* **Tests**: `MADPostgres/MADPostgresTests`. Run with
`xcodebuild test -workspace Reports.xcworkspace -scheme MADPostgres -destination 'platform=iOS Simulator,id=94952340-7629-4EBB-BBD3-6FEE068793B8' -derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-cozeiyczmvgrbeapplwfuygymqci`.
`xcodebuild test -workspace Reports.xcworkspace -scheme MADPostgres -destination 'platform=iOS Simulator,id=<device-udid>' -derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-shared`.
Pick `<device-udid>` from `xcrun simctl list devices available`; see the root [`AGENTS.md`](../AGENTS.md) § Testing.
* **Live tests**: `MADPostgresTests/MADPostgresLiveTests.m` talks to a real PostgreSQL server and skips when none is reachable. Override credentials with `MAD_PG_TEST_*` environment variables (`MAD_PG_TEST_HOST`, `MAD_PG_TEST_PORT`, `MAD_PG_TEST_USER`, `MAD_PG_TEST_PASSWORD`, `MAD_PG_TEST_DATABASE`). `TestDatabase/postgres-test-db.sh` manages the `mad-postgres` Docker container. On Windows (Phase 3b) drive the same server through [`TestDatabase/test-databases.ps1`](../TestDatabase/README.md) (or `TestDatabase/test-databases.sh`) and set `MAD_PG_TEST_HOST/PORT/USER/PASSWORD/DATABASE` from its `env` output; the Xcode scheme's pre/post actions (up/down) are macOS-only.
5 changes: 3 additions & 2 deletions MADSqlite3/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ When performing multiple database operations that need to be treated as a single
## Testing and Reports

* **Tests**: `MADSqlite3/MADSqlite3Tests`. Run with
`xcodebuild test -workspace Reports.xcworkspace -scheme MADSqlite3 -destination 'platform=iOS Simulator,name=iPhone 17 Pro'`.
`xcodebuild test -workspace Reports.xcworkspace -scheme MADSqlite3 -destination 'platform=iOS Simulator,id=<device-udid>' -derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-shared`.
Pick `<device-udid>` from `xcrun simctl list devices available`; see the root [`AGENTS.md`](../AGENTS.md) § Testing.
* **Known issues**: [`BUGS.md`](../docs/project/registers/BUGS.md) -- see the `## MADSqlite3` section.
* **Task queue**: [`TASKS.md`](../docs/project/registers/TASKS.md) -- maintain it, but do not start work from it.
* **Architecture**: [`MADDataTable_Architecture_Report.md`](../docs/developers/architecture/data-table.md).
* **Architecture**: [`data-table.md`](../docs/developers/architecture/data-table.md).
9 changes: 4 additions & 5 deletions MADTds/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@ The `MADTds` framework provides a high-level Objective-C wrapper for the FreeTDS
* **TDS Protocol Support**: The framework leverages the FreeTDS library to provide support for the Tabular Data Stream (TDS) protocol, which is used by Sybase and Microsoft SQL Server.
* **Objective-C Wrapper**: It provides an Objective-C wrapper around the FreeTDS C library, making it easier to work with these databases in an iOS application.
* **Connection Management**: The framework includes the `MADTdsDb` class, which simplifies the process of connecting to a database, executing queries, and retrieving results.
* **Custom Build Script**: It includes a shell script (`build_tds.sh`) for building the FreeTDS library, which is a critical part of the framework's setup.
* **Pinned FreeTDS**: The framework links the FreeTDS static libraries and headers built by the `Compressor` recipe (`Compressor/matrix.conf`, `Compressor/lib/recipes/freetds.sh`), and exposes the matching headers as its own public headers.

## Core Components

* **`MADTdsDb`**: The primary class for interacting with a TDS database. It provides methods for connecting, disconnecting, and executing SQL queries. It also manages the connection properties, such as the server, database, username, and password.
* **`sybdb.h`**: The main header file for the FreeTDS library's `db-lib` API, which is used for interacting with TDS databases.
* **`tds_sysdep_public.h`**: A system-dependent header file for FreeTDS.
* **`build_tds.sh`**: A shell script that is used to build the FreeTDS static libraries (`libct.a` and `libsybdb.a`) that are bundled with the framework.
* **`sybdb.h`**: The main header file for the FreeTDS library's `db-lib` API, supplied by the `Compressor` FreeTDS build and exposed as `<MADTds/sybdb.h>`.
* **`tds_sysdep_public.h`**: The FreeTDS system-dependent header, supplied by the same build and exposed as `<MADTds/tds_sysdep_public.h>`.

## Usage Guidelines

When you need to connect to a Sybase or Microsoft SQL Server database, you should use the `MADTdsDb` class. This class provides a simple and convenient way to execute queries and retrieve results. You will need to configure the connection properties (server, database, username, and password) before you can connect to the database.

If you need to make changes to the FreeTDS library itself, you will need to modify the `build_tds.sh` script and then rebuild the framework. However, this should only be done if you have a deep understanding of the FreeTDS library and its build process.
If you need to change the FreeTDS version or its build, edit its row in `Compressor/matrix.conf` and its recipe in `Compressor/lib/recipes/freetds.sh`, then rebuild through `Compressor/build.sh`; see `docs/developers/build/libraries.md` §1.

## Testing and Reports

Expand Down
Loading
Loading