summaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README29
1 files changed, 26 insertions, 3 deletions
diff --git a/README b/README
index 8b5d9e3..f795411 100644
--- a/README
+++ b/README
@@ -220,14 +220,37 @@ Reading this as an operator
hit it instead of a ticket to whoever set this up.
+Layout
+------
+
+ cmd/main.c the command line: dispatch, usage, exit status
+ src/ the engine, as a library the command line adds nothing to
+ test/ one program per area, plus the behavioural suite
+ build/ helpers used while building and installing
+ container/ the image: Dockerfile, entrypoint, server configuration
+ ci/ the pipeline
+
+ src/glob.c the pattern matching, such as it is
+ src/util.c allocation, string buffers, writing a file atomically
+ src/policy.c reading the file, and answering from it
+ src/hook.c the mode git calls, and the only one a push depends on
+ src/validate.c does this policy, and the host around it, add up
+ src/edit.c grant and revoke, without losing the file
+
+Everything compiles into `obj/`, test runners included, so a build leaves the
+tree as it found it apart from the binary. `git-authz` is one program rather
+than several because every one of them has to answer "what does this rule mean"
+identically: a `check` that disagrees with the hook is not two programs, it is
+one that lies.
+
+
Tests
-----
make test
-`tests/unit.c` tests the policy engine directly - matching, normalisation, the
-ladder, `@all`, scope, the sentences - and is the place where the semantics
-are pinned. `tests/run.sh` drives the binary the way git does: an identity in
+The programs in `test/` test the engine directly - matching, normalisation, the
+ladder, `@all`, scope, the sentences - and are where the semantics are pinned. `test/run.sh` drives the binary the way git does: an identity in
the environment, `old new ref` lines on stdin, the repository as the working
directory, the hook reached through its own name. It uses no git at all, so it
runs anywhere a compiler does, and it tests the real binary rather than a model