Commit 3163e14
Resurrect the framework Idris2 core: compile all 13 modules (Framework + Filesystem + A2ML) (#16)
* fix(framework): compile Framework core + Filesystem subsystem
Make the Framework core and Filesystem modules type-check (8/13 of the
package; the A2ML chain is a separate WIP sketch):
- Progressive: define rank/atLeast, add Eq, complete the Ord instance
(was '-- ... [Remaining cases]').
- Proof: fix //! and // comments; define HashValue (+ DecEq) and the
FullyAttested witness + fullyAttest smart constructor.
- Error: define showPriority/showQuery/showZone and the hashError
smart constructor.
- Interface: define the Snapshot type; implement the verifyOrRepair
pipeline (was a stub referencing an undefined 'proof'); bind {sub}.
- Filesystem.Merkle: rename the 'proof' parameter (now a reserved word
in Idris2 0.8) and import Data.Nat for div on Nat.
- Filesystem.Verify: replace the placeholder 'MkHashesMatch _ cv cv Refl'
with a genuine decEq-derived equality proof over HashValue.
* feat(a2ml): implement the A2ML lexer/parser/validator/serializer
Replace the A2ML design sketch (undefined core types, stubbed bodies) with a
complete, total, working implementation of its section-based design:
- Types: define SourceLoc, Token (+ Eq TokenKind), the punctuation/number/bool
token kinds, and the four section types (ManifestSection, RefsSection with
Ref, AttestationSection, PolicySection with PolicyMode).
- Lexer: a total, fuel-bounded scanner with structural collectors; handles
@Keywords, strings, numbers, booleans, punctuation, and algo:digest hashes.
- Parser: a total recursive-descent parser (fuel-bounded section dispatch,
structural @refs loop) producing a Manifest.
- Validator: per-section semantic checks (hash length/format, required fields).
- Serializer: renders a Manifest back to canonical surface syntax.
Verified with Idris2 0.8.0: package builds 13/13; lex/parse/serialize/validate
are total; a sample manifest parses, validates, and round-trips
(parse (lex (serialize m)) preserves the manifest).
* fix(ci): point CodeQL at 'actions', not absent javascript-typescript
The repo has zero JS/TS sources, so CodeQL's javascript-typescript extractor
failed with a configuration error ('no code found') on every run. Analyse the
GitHub Actions workflows instead (build-mode none), matching the ochrance
repo's working CodeQL config. SPDX header, permissions, and SHA-pins are
unchanged, so the workflow-security-linter gate stays green.
---------
Co-authored-by: Claude <paraordinate@yahoo.co.uk>1 parent 8970a45 commit 3163e14
12 files changed
Lines changed: 651 additions & 133 deletions
File tree
- .github/workflows
- ochrance-core/Ochrance
- A2ML
- Filesystem
- Framework
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
32 | 44 | | |
33 | | - | |
| 45 | + | |
34 | 46 | | |
35 | 47 | | |
36 | | - | |
37 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
38 | 68 | | |
39 | 69 | | |
40 | 70 | | |
41 | 71 | | |
42 | 72 | | |
43 | 73 | | |
44 | 74 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
52 | 89 | | |
53 | 90 | | |
54 | 91 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
64 | 138 | | |
65 | 139 | | |
66 | 140 | | |
| |||
69 | 143 | | |
70 | 144 | | |
71 | 145 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 146 | + | |
0 commit comments