factory-line-audit 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. factory_line_audit-0.1.0/LICENSE +202 -0
  2. factory_line_audit-0.1.0/NOTICE +41 -0
  3. factory_line_audit-0.1.0/PKG-INFO +225 -0
  4. factory_line_audit-0.1.0/README.md +208 -0
  5. factory_line_audit-0.1.0/pyproject.toml +89 -0
  6. factory_line_audit-0.1.0/setup.cfg +4 -0
  7. factory_line_audit-0.1.0/src/factory_line_audit/__init__.py +7 -0
  8. factory_line_audit-0.1.0/src/factory_line_audit/capture.py +367 -0
  9. factory_line_audit-0.1.0/src/factory_line_audit/cli.py +477 -0
  10. factory_line_audit-0.1.0/src/factory_line_audit/declarations.py +264 -0
  11. factory_line_audit-0.1.0/src/factory_line_audit/exit_contract.py +277 -0
  12. factory_line_audit-0.1.0/src/factory_line_audit/feeder.py +323 -0
  13. factory_line_audit-0.1.0/src/factory_line_audit/formats.py +81 -0
  14. factory_line_audit-0.1.0/src/factory_line_audit/generator.py +450 -0
  15. factory_line_audit-0.1.0/src/factory_line_audit/presence.py +248 -0
  16. factory_line_audit-0.1.0/src/factory_line_audit/regression.py +121 -0
  17. factory_line_audit-0.1.0/src/factory_line_audit/report.py +144 -0
  18. factory_line_audit-0.1.0/src/factory_line_audit/tools.py +132 -0
  19. factory_line_audit-0.1.0/src/factory_line_audit/vertical.py +351 -0
  20. factory_line_audit-0.1.0/src/factory_line_audit/walkcheck.py +164 -0
  21. factory_line_audit-0.1.0/src/factory_line_audit.egg-info/PKG-INFO +225 -0
  22. factory_line_audit-0.1.0/src/factory_line_audit.egg-info/SOURCES.txt +40 -0
  23. factory_line_audit-0.1.0/src/factory_line_audit.egg-info/dependency_links.txt +1 -0
  24. factory_line_audit-0.1.0/src/factory_line_audit.egg-info/entry_points.txt +5 -0
  25. factory_line_audit-0.1.0/src/factory_line_audit.egg-info/requires.txt +9 -0
  26. factory_line_audit-0.1.0/src/factory_line_audit.egg-info/top_level.txt +1 -0
  27. factory_line_audit-0.1.0/tests/test_bad_state.py +128 -0
  28. factory_line_audit-0.1.0/tests/test_capture.py +108 -0
  29. factory_line_audit-0.1.0/tests/test_capture_security.py +123 -0
  30. factory_line_audit-0.1.0/tests/test_commit_msg_check.py +145 -0
  31. factory_line_audit-0.1.0/tests/test_declarations.py +109 -0
  32. factory_line_audit-0.1.0/tests/test_exit_contract.py +160 -0
  33. factory_line_audit-0.1.0/tests/test_feeder_and_report.py +153 -0
  34. factory_line_audit-0.1.0/tests/test_generator.py +173 -0
  35. factory_line_audit-0.1.0/tests/test_hygiene_check.py +225 -0
  36. factory_line_audit-0.1.0/tests/test_presence.py +209 -0
  37. factory_line_audit-0.1.0/tests/test_readme.py +262 -0
  38. factory_line_audit-0.1.0/tests/test_refusals.py +167 -0
  39. factory_line_audit-0.1.0/tests/test_regression.py +171 -0
  40. factory_line_audit-0.1.0/tests/test_tools.py +113 -0
  41. factory_line_audit-0.1.0/tests/test_vertical_agrees.py +208 -0
  42. factory_line_audit-0.1.0/tests/test_walkcheck.py +153 -0
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,41 @@
1
+ factory-line-audit
2
+ Copyright 2026 The Arbiter Project Authors
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
5
+ this file except in compliance with the License. You may obtain a copy of the
6
+ License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software distributed
11
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
12
+ CONDITIONS OF ANY KIND, either express or implied.
13
+
14
+ This project reads a discrete-manufacturing line over OPC UA. It is not
15
+ affiliated with, endorsed by, or part of the OPC Foundation, and `OPC UA` is
16
+ their trademark rather than anything claimed here.
17
+
18
+ NO REDISTRIBUTED THIRD-PARTY CONTENT
19
+
20
+ Nothing in this repository was copied from anywhere else. `examples/` is
21
+ invented in full and says so on its face: every `basis` string in the
22
+ declaration fixture begins `FIXTURE`, and the review gate passes that file only
23
+ because it discloses itself. No number here is a fact about a real machine, and
24
+ no register here was exported from a real plant.
25
+
26
+ `battery/corpus/` is generated by `battery/make_corpus.py` and is not committed.
27
+ It expires: several of the engine's arms count inside a window measured
28
+ backwards from now, so a committed copy would be stale on arrival.
29
+
30
+ DEPENDENCIES, SEPARATELY LICENSED
31
+
32
+ At Stage 2 this project depends on `arbiter-engine`, and the optional vertical
33
+ registration depends on `presence-audit`. Both are separately licensed under the
34
+ same terms. This is a consumer of them and not a part of either.
35
+
36
+ Stage 1 -- presence, the declarations channel, its gate, and model generation --
37
+ depends on nothing at all, and that is asserted by a test rather than promised
38
+ here.
39
+
40
+ The method this bridge was built to is `BRIDGES.md` in the `arbiter-engine`
41
+ repository. `FINDINGS.md` reports where following it produced a wrong answer.
@@ -0,0 +1,225 @@
1
+ Metadata-Version: 2.4
2
+ Name: factory-line-audit
3
+ Version: 0.1.0
4
+ Summary: A bridge from a discrete-manufacturing line to arbiter-engine
5
+ License-Expression: Apache-2.0
6
+ Requires-Python: >=3.10
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ License-File: NOTICE
10
+ Provides-Extra: detect
11
+ Requires-Dist: arbiter-engine<0.2,>=0.1.10; extra == "detect"
12
+ Provides-Extra: live
13
+ Requires-Dist: asyncua<3,>=1.0; extra == "live"
14
+ Provides-Extra: vertical
15
+ Requires-Dist: presence-audit<0.2,>=0.1.6; extra == "vertical"
16
+ Dynamic: license-file
17
+
18
+ # factory-line-audit
19
+
20
+ A bridge from a discrete-manufacturing line to
21
+ [`arbiter-engine`](https://github.com/james-sheen/arbiter), built to the method
22
+ in that repository's `BRIDGES.md` against nothing but its published surfaces.
23
+
24
+ **The engine and this bridge share an author.** So the exam below is a
25
+ deliberate self-exam, not the independent adoption `BRIDGES.md` asks for, and
26
+ this sentence used to say otherwise. What the findings rest on is the method
27
+ rather than the distance: the bridge was written from the published document and
28
+ the released package, and every claim names the probe that produced it. Read
29
+ them as a first pass by someone holding every advantage.
30
+
31
+ The engine judges series and properties it is handed and refuses to invent a fact
32
+ to fill a gap. Everything it refuses to own -- what exists on the line, what each
33
+ tag is, what is deliberately not watched, what only an operator can know, what
34
+ gets fed and when, and how a verdict becomes an exit code -- is here.
35
+
36
+ **Its purpose is twofold.** It is a working audit tool for a cell of stations,
37
+ presses, robots and controllers read over OPC UA. It is also an exam of the
38
+ method: `BRIDGES.md` invites the first vertical that shares no vocabulary with
39
+ its worked examples to report the parts that do not survive contact.
40
+ [FINDINGS.md](FINDINGS.md) is that report: findings against the method, findings
41
+ against the engine and its modelling guide, and **both** of the findings the
42
+ previous attempt at this bridge left to be filed upstream, withdrawn because
43
+ re-measurement did not reproduce them.
44
+
45
+ **Released -- 0.1.0**, tagged `v0.1.0`, Apache-2.0, on PyPI as
46
+ [`factory-line-audit`](https://pypi.org/project/factory-line-audit/).
47
+
48
+ **Status: a live-but-safe surface read for real -- the third of the four rungs
49
+ named below.** Thirteen battery legs green against
50
+ `arbiter-engine 0.1.10` from PyPI, including a real OPC UA server read by a real
51
+ client and the built wheel installed into an empty environment. Nothing here has
52
+ touched a plant. Every number in `examples/` is invented.
53
+
54
+ ---
55
+
56
+ ## The two stages
57
+
58
+ **Stage 1 -- presence.** Given a register of what should exist and a walk of what
59
+ the server served, classify every declared tag three ways: reading, present but
60
+ not reading, absent. This has **no dependencies at all**, and asserting that is
61
+ a test rather than a promise.
62
+
63
+ **Stage 2 -- detection.** Generate a model and a manifest from the register plus
64
+ reviewed operator declarations, feed only what Stage 1 saw reading, and turn the
65
+ engine's envelope into an exit code, an attestation and a human report.
66
+
67
+ ```
68
+ register.json ─┬─> presence ──> presence/1
69
+ │ │
70
+ declarations ──┤ └────────┐ (only reading tags are fed)
71
+ (gated) │ v
72
+ └─> generate ──> model.yaml + manifest/1 ──> detect ──> attest/1
73
+ exit {0,1,2}
74
+ ```
75
+
76
+ ## Exit codes
77
+
78
+ `0` clean, `1` findings, `2` could-not-complete. `2` never reads as clean and `2`
79
+ beats `1`. Composed as the maximum over every leg, with each floor decided at
80
+ design time in `exit_contract.py` -- including, unusually, floors for **findings**
81
+ as well as declines. The reason is measured and is in
82
+ [FINDINGS.md A3](FINDINGS.md).
83
+
84
+ ## Quick start
85
+
86
+ To use it: `pip install 'factory-line-audit[detect,live]'`. To work on it, or to
87
+ run the verification battery below, take a checkout instead:
88
+
89
+ ```bash
90
+ git clone https://github.com/james-sheen/factory-line-audit
91
+ cd factory-line-audit
92
+ python3 -m virtualenv /tmp/v && /tmp/v/bin/pip install -e '.[detect,live]'
93
+ export PYTHONPATH=src
94
+
95
+ # C3 -- measure the engine you pinned. Everything else derives from this.
96
+ /tmp/v/bin/python battery/probe_engine.py
97
+
98
+ # the corpus, sized from those floors and stamped at build time
99
+ python3 battery/make_corpus.py
100
+
101
+ # Stage 1, with the engine uninstalled if you like
102
+ python3 -m factory_line_audit.cli presence \
103
+ --register examples/asset_register.json --walk battery/corpus/clean.json
104
+
105
+ # the channel and its gate
106
+ python3 -m factory_line_audit.cli draft --register examples/asset_register.json --out /tmp/d.json # 0
107
+ python3 -m factory_line_audit.cli gate --register examples/asset_register.json /tmp/d.json # 2, names it
108
+ python3 -m factory_line_audit.cli gate --register examples/asset_register.json \
109
+ examples/declarations/line1.fixture.json # 0
110
+
111
+ # Stage 2
112
+ /tmp/v/bin/python -m factory_line_audit.cli detect \
113
+ --register examples/asset_register.json --walk battery/corpus/clean.json \
114
+ --declarations examples/declarations/line1.fixture.json --attest-out /tmp/attest.json
115
+
116
+ # C8 -- exercise both declared ranges, floors included (installs each release; slow)
117
+ python3 battery/probe_pin.py
118
+
119
+ # does the core still accept this vertical? two imports, and CI runs it too
120
+ /tmp/v/bin/python battery/probe_conformance.py
121
+
122
+ # the whole battery
123
+ /tmp/v/bin/python battery/run_battery.py --python /tmp/v/bin/python --live-python /tmp/v/bin/python
124
+ ```
125
+
126
+ ## The verification battery
127
+
128
+ Sixteen legs: the twelve in `BRIDGES.md`'s verification battery, plus four added
129
+ with the argument written down.
130
+
131
+ All five additions started here. `pin` was proposed by this package and is now a
132
+ row in the guide's own table, so it is no longer an addition and is unmarked
133
+ below. `corpus`, `conformance`, `regression` and `capture` still are.
134
+
135
+ | Leg | Question |
136
+ |---|---|
137
+ | `corpus` **added** | Is the corpus still inside the narrowest measured window? |
138
+ | `live` | Can a live OPC UA surface be read at all, and how many nodes did it serve? |
139
+ | `capture` **added** | Does the shipped verb print one OUTCOME line, a handle `sha256sum` agrees with, and a membership cache holding no reading? |
140
+ | `draft` | Does draft tooling emit an unreviewed statement and exit clean? |
141
+ | `gate` | Does the gate then refuse that exact file, by name? |
142
+ | `clean` | Over an uncontaminated corpus, does the pipeline stay quiet? |
143
+ | `fault` | For each of thirteen fault classes, is the injected thing found? |
144
+ | `absent` | Is a declared-but-absent source a finding, not an incompleteness? |
145
+ | `attest` | Does attestation work through the same front door? |
146
+ | `pipe` | Does a reader walking away change the verdict, or print anything? |
147
+ | `tool` | Is the tool surface closed, and does every entry construct? |
148
+ | `suite` | Does the suite pass from a directory that is not the repository? |
149
+ | `conformance` **added** | Does the core's own kit still accept this vertical, and does its noun reach the core? |
150
+ | `regression` **added** | Does a declared prefix move pair, and the same move undeclared get reported and not applied? |
151
+ | `pin` | Does every release inside each declared range actually run? |
152
+ | `ship` | Does the built artifact, installed clean, still do all of that? |
153
+
154
+ A leg that could not run reports `2` and is **named**, never skipped.
155
+ `--only NAME` runs a subset; a name no leg carries is refused rather than
156
+ answered with an empty run, and the result file records the selection so a
157
+ partial run cannot read as a full one.
158
+
159
+ Most of the battery is run by hand, because it builds a wheel and installs
160
+ every release in two ranges. Three legs are the exception and run in CI:
161
+ `conformance` on every interpreter, because it costs two imports and is the
162
+ only leg whose question is about software this package does not control; and
163
+ `live` and `capture` on one, because the OPC UA surface is anonymous,
164
+ localhost and over in seconds, and `capture` is the only verb here that talks
165
+ to anything. `probe_status_words.py` runs beside them: it grades every status
166
+ word `asyncua` can report, which is the population a real PLC draws from
167
+ rather than the three the corpus happens to carry. A leg nothing triggers is a leg nobody reads, which is the same
168
+ argument the legs themselves are written from.
169
+
170
+ ## Formats
171
+
172
+ All JSON, all carrying a `format` string, all refusing an unknown major by name.
173
+
174
+ | Format | What it is |
175
+ |---|---|
176
+ | `factory-line-audit/register/1` | What should exist: assets, tags with a declared `class` and node id, typed relations |
177
+ | `factory-line-audit/walk/1` | What the server served, with per-reading status word and source timestamp |
178
+ | `factory-line-audit/presence/1` | Stage 1's three-way classification |
179
+ | `factory-line-audit/declaration/1` | Operator statements, each with a `basis`, and a review marker |
180
+ | `factory-line-audit/manifest/1` | Everything excluded from the model with a reason, the entity-type map, and every indicator this package derived |
181
+ | `factory-line-audit/attest/1` | Per-run record: checked, declined, not-established, engine strings verbatim, exit |
182
+
183
+ ## Declarations
184
+
185
+ A rule can propose an operator-knowledge fact. It cannot know one. Every
186
+ statement carries a `basis` -- what the declarer actually looked at -- and
187
+ `draft` emits them unreviewed with every basis empty and every number null,
188
+ because the one thing a rule cannot supply is why.
189
+
190
+ Kinds: `bound`, `setpoint`, `rate`, `redundant`, `conservation`,
191
+ `expect_variation`, `slow_oscillation`, `gate_on`, `exclusion`. Each maps onto
192
+ exactly one thing the engine would otherwise decline, which is the decline
193
+ vocabulary read backwards.
194
+
195
+ A file becomes usable when a person adds their name **and** the date. A test
196
+ fixture passes only by disclosing itself on its face, never by naming a reviewer.
197
+
198
+ ## The evidence ladder
199
+
200
+ | Rung | What it is | Here |
201
+ |---|---|---|
202
+ | 1 | Synthetic corpus | `battery/corpus/clean.json`, sized from measured floors |
203
+ | 2 | Mutated copies | thirteen one-fault copies with expectations declared before the run |
204
+ | 3 | A live-but-safe surface | `battery/opcua_surface.py` -- a real server, a real client, localhost |
205
+ | 4 | First contact | **not climbed.** A person, a plant, a register exported from that plant's MES, declarations signed by that plant's engineers |
206
+
207
+ Rung 3 is evidence that the walk format survives a real client, that node ids
208
+ resolve, that a status word comes back as a status word, and that a node which is
209
+ not there fails the way Stage 1 says it does. It is **not** evidence about
210
+ security, certificates, a vendor's address space, or load.
211
+
212
+ First contact is deliberately absent from the tool surface as well, and the
213
+ closure test asserts that absence.
214
+
215
+ ## What this package does not claim
216
+
217
+ - No number in `examples/` is a fact about a real machine. The declaration file
218
+ says so on its face and every `basis` string begins `FIXTURE`.
219
+ - The engine measured is `0.1.10` from PyPI, and `0.1.11.dev0` from `master` was
220
+ run too. Any other pin needs `probe_engine.py` re-run, not re-read.
221
+ - Ten of the twelve decline reasons are reachable from a model this package could
222
+ generate. `not_applicable` and `checker_error` are engine-side.
223
+ - The learned-baseline warning arm has a measured false-positive rate of roughly
224
+ one series in twelve. It is reported in full and floored at 0, and that is a
225
+ judgement, written down in `exit_contract.py` with the measurement behind it.