json-rest-api 1.0.20 → 1.0.22
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.
- package/audit/00-charter.md +103 -0
- package/audit/01-scope-map.md +84 -0
- package/audit/02-coverage-matrix.csv +174 -0
- package/audit/03-invariants.md +123 -0
- package/audit/04-standards-rubric.md +56 -0
- package/audit/05-competitor-rubric.md +77 -0
- package/audit/06-findings.md +160 -0
- package/audit/07-risk-register.csv +10 -0
- package/audit/08-remediation-roadmap.md +177 -0
- package/audit/09-signoff-check.md +23 -0
- package/audit/10-final-synthesis.md +29 -0
- package/audit/evidence/code/all-files-json-rest-api.txt +168 -0
- package/audit/evidence/code/all-files-json-rest-schema.txt +12 -0
- package/audit/evidence/code/boundary-leak-checks.txt +72 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__bulk-operations-plugin.js.txt +480 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__connectors__express-plugin.js.txt +532 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__connectors__lib__busboy-detector.js.txt +175 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__connectors__lib__formidable-detector.js.txt +138 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__connectors__lib__request-helpers.js.txt +222 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__file-handling-plugin.js.txt +342 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__dbTablesOperations.js.txt +304 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__fractional-positioning.js.txt +188 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__compile-schemas.js.txt +336 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__connectors-query-parser.js.txt +165 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__database-capabilities.js.txt +265 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__database-value-normalizers.js.txt +369 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__default-data-helpers.js.txt +72 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__field-utils.js.txt +139 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__knex-constants.js.txt +45 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__knex-field-helpers.js.txt +396 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__knex-json-api-transformers.js.txt +162 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__payload-validators.js.txt +1314 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__schema-helpers.js.txt +488 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__scope-validations.js.txt +484 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying-writing__simplified-helpers.js.txt +857 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__knex-cross-table-search.js.txt +565 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__knex-json-api-transformers-querying.js.txt +485 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__knex-pagination-helpers.js.txt +560 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__knex-process-includes.js.txt +167 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__knex-query-helpers-base.js.txt +109 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__knex-query-helpers.js.txt +1064 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__knex-relationship-includes.js.txt +1983 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__knex-window-queries.js.txt +328 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__querying__url-helpers.js.txt +119 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__storage__storage-adapter.js.txt +160 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__writing__many-to-many-manipulations.js.txt +300 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__lib__writing__relationship-processor.js.txt +245 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-access.js.txt +459 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-cors-plugin.js.txt +237 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-knex-plugin.js.txt +1135 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-multihome-plugin.js.txt +314 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-hooks__compile-resource-schemas.js.txt +7 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-hooks__register-relationship-routes.js.txt +71 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-hooks__register-scope-routes.js.txt +102 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-hooks__turn-scope-init-into-vars.js.txt +49 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-hooks__validate-include-configurations.js.txt +39 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__add-route.js.txt +23 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__check-permissions.js.txt +13 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__common.js.txt +639 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__delete-relationship.js.txt +117 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__delete.js.txt +104 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__enrich-attributes.js.txt +199 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__get-related.js.txt +353 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__get-relationship.js.txt +61 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__get.js.txt +184 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__patch-relationship.js.txt +55 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__patch.js.txt +191 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__post-relationship.js.txt +110 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__post.js.txt +168 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__put.js.txt +253 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__query.js.txt +207 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin-methods__release.js.txt +12 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-plugin.js.txt +165 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__rest-api-positioning-plugin.js.txt +668 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__core__socketio-plugin.js.txt +621 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__storage__local-storage.js.txt +218 -0
- package/audit/evidence/code/critical-pass1/json-rest-api__plugins__storage__s3-storage.js.txt +124 -0
- package/audit/evidence/code/critical-pass1/json-rest-schema__src__CorePlugin.js.txt +269 -0
- package/audit/evidence/code/critical-pass1/json-rest-schema__src__Schema.js.txt +242 -0
- package/audit/evidence/code/critical-pass1/json-rest-schema__src__index.js.txt +77 -0
- package/audit/evidence/code/critical-pass1-risk-keywords.txt +238 -0
- package/audit/evidence/code/critical-pass1-summary.csv +67 -0
- package/audit/evidence/code/critical-pass2-summary.csv +67 -0
- package/audit/evidence/code/early-silent-zones-no-test-token.txt +57 -0
- package/audit/evidence/code/error-model-signals.txt +98 -0
- package/audit/evidence/code/git-files-json-rest-api.txt +171 -0
- package/audit/evidence/code/git-files-json-rest-schema.txt +27 -0
- package/audit/evidence/code/hook-flow-signals.txt +282 -0
- package/audit/evidence/code/idproperty-signals.txt +157 -0
- package/audit/evidence/code/import-cycles-non-anyapi.txt +3 -0
- package/audit/evidence/code/import-hotspots-non-anyapi.txt +96 -0
- package/audit/evidence/code/imports-json-rest-api.txt +354 -0
- package/audit/evidence/code/imports-json-rest-schema.txt +15 -0
- package/audit/evidence/code/in-scope-files-json-rest-api.txt +160 -0
- package/audit/evidence/code/in-scope-files-json-rest-schema.txt +13 -0
- package/audit/evidence/code/non-anyapi-core-files.txt +101 -0
- package/audit/evidence/code/permission-signals.txt +193 -0
- package/audit/evidence/code/query-include-signals.txt +687 -0
- package/audit/evidence/code/transaction-signals.txt +28 -0
- package/audit/evidence/code/validation-signals.txt +650 -0
- package/audit/evidence/code/write-path-signals.txt +61 -0
- package/audit/evidence/docs/docs-claims-signals.txt +1075 -0
- package/audit/evidence/docs/schema-docs-claims-signals.txt +179 -0
- package/audit/evidence/external/corpus-freeze.md +21 -0
- package/audit/evidence/external/npm-competitor-metadata.txt +70 -0
- package/audit/evidence/external/npm-download-signals.txt +23 -0
- package/audit/evidence/external/npm-jsonapi-server.txt +8 -0
- package/audit/evidence/external/npm-modern-jsonapi-metadata.txt +38 -0
- package/audit/evidence/external/readme-fortune-signals.txt +26 -0
- package/audit/evidence/external/readme-fortune.md +165 -0
- package/audit/evidence/external/readme-json-api-serializer-signals.txt +80 -0
- package/audit/evidence/external/readme-json-api-serializer.md +690 -0
- package/audit/evidence/external/readme-jsonapi-serde-server-signals.txt +0 -0
- package/audit/evidence/external/readme-jsonapi-serde-server.md +22 -0
- package/audit/evidence/external/readme-jsonapi-serializer-signals.txt +63 -0
- package/audit/evidence/external/readme-jsonapi-serializer.md +315 -0
- package/audit/evidence/external/readme-jsonapi-server-signals.txt +19 -0
- package/audit/evidence/external/readme-jsonapi-server.md +104 -0
- package/audit/evidence/external/readme-nestjs-json-api-signals.txt +4 -0
- package/audit/evidence/external/readme-nestjs-json-api.md +94 -0
- package/audit/evidence/external/readme-yaser-json-api-nestjs-signals.txt +47 -0
- package/audit/evidence/external/readme-yaser-json-api-nestjs.md +447 -0
- package/audit/evidence/external/standard-jsonapi-snippets.txt +84 -0
- package/audit/evidence/external/standard-rfc-snippets.txt +168 -0
- package/audit/evidence/external/standards-sources.txt +6 -0
- package/audit/evidence/runtime/baseline-commits.txt +2 -0
- package/audit/evidence/runtime/db-adapter-assumptions.txt +3 -0
- package/audit/evidence/runtime/environment.txt +4 -0
- package/audit/evidence/runtime/invariant-runtime-mapping.md +38 -0
- package/audit/evidence/runtime/probe-patch-relationship-error.exitcode +1 -0
- package/audit/evidence/runtime/probe-patch-relationship-error.log +76 -0
- package/audit/evidence/runtime/probe-patch-relationship-error.mjs +67 -0
- package/audit/evidence/runtime/probe-patch-relationship-referenceerror.exitcode +1 -0
- package/audit/evidence/runtime/probe-patch-relationship-referenceerror.log +62 -0
- package/audit/evidence/runtime/probe-patch-relationship-referenceerror.mjs +47 -0
- package/audit/evidence/runtime/test-exitcodes.txt +4 -0
- package/audit/evidence/runtime/test-summary.md +107 -0
- package/audit/evidence/runtime/trace-anchors.txt +61 -0
- package/audit/evidence/tests/access-multitenancy-test-signals.txt +125 -0
- package/audit/evidence/tests/failing-tests-summary.txt +25 -0
- package/audit/evidence/tests/npm-test-json-rest-api.exitcode +1 -0
- package/audit/evidence/tests/npm-test-json-rest-api.log +5885 -0
- package/audit/evidence/tests/npm-test-json-rest-schema.exitcode +1 -0
- package/audit/evidence/tests/npm-test-json-rest-schema.log +356 -0
- package/audit/evidence/tests/query-include-test-signals.txt +948 -0
- package/audit/evidence/tests/relationship-test-signals.txt +223 -0
- package/audit/evidence/tests/skipped-tests.txt +10 -0
- package/audit/evidence/tests/test-suite-list-non-anyapi.txt +30 -0
- package/audit/evidence/tests/test-suite-list.txt +32 -0
- package/audit/subsystems/docs-drift.md +49 -0
- package/audit/subsystems/pass2-cross-review.md +131 -0
- package/audit/subsystems/plugins-access.md +51 -0
- package/audit/subsystems/plugins-bulk.md +50 -0
- package/audit/subsystems/plugins-cors.md +48 -0
- package/audit/subsystems/plugins-file.md +53 -0
- package/audit/subsystems/plugins-multihome.md +50 -0
- package/audit/subsystems/plugins-positioning.md +54 -0
- package/audit/subsystems/plugins-socketio.md +50 -0
- package/audit/subsystems/query-engine.md +61 -0
- package/audit/subsystems/relationships.md +55 -0
- package/audit/subsystems/rest-orchestration.md +66 -0
- package/audit/subsystems/schema-core.md +64 -0
- package/audit/subsystems/storage-knex.md +57 -0
- package/audit/subsystems/tests.md +48 -0
- package/audit/subsystems/transport-express.md +55 -0
- package/audit/traces/trace-read-get.md +22 -0
- package/audit/traces/trace-read-query.md +25 -0
- package/audit/traces/trace-relationship-endpoints.md +31 -0
- package/audit/traces/trace-write-delete.md +17 -0
- package/audit/traces/trace-write-patch.md +26 -0
- package/audit/traces/trace-write-post.md +22 -0
- package/audit/traces/trace-write-put.md +23 -0
- package/package.json +5 -5
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Technical Audit Charter
|
|
2
|
+
|
|
3
|
+
## Mission
|
|
4
|
+
Produce a formal, evidence-driven audit of architecture quality, code quality, standards alignment, competitive positioning, and operational risk for:
|
|
5
|
+
- `/home/merc/Development/current/json-rest-api`
|
|
6
|
+
- `/home/merc/Development/current/json-rest-schema`
|
|
7
|
+
|
|
8
|
+
## Scope
|
|
9
|
+
### Included
|
|
10
|
+
- Runtime architecture, data/control flow, and plugin interactions for non-`anyapi` code paths.
|
|
11
|
+
- Schema compilation/validation behavior in `json-rest-schema` and its integration surface in `json-rest-api`.
|
|
12
|
+
- Test and documentation alignment for critical behavior.
|
|
13
|
+
- Runtime/test corroboration for risk classification.
|
|
14
|
+
|
|
15
|
+
### Explicit Exclusions
|
|
16
|
+
- `anyapi` implementation and behavior are fully out-of-scope for conclusions, scoring, and recommendations.
|
|
17
|
+
- Excluded path classes (json-rest-api):
|
|
18
|
+
- `plugins/core/lib/anyapi/**`
|
|
19
|
+
- `plugins/core/rest-api-anyapi-knex-plugin.js`
|
|
20
|
+
- `tests/anyapi-*.test.js`
|
|
21
|
+
- `scripts/*anyapi*`
|
|
22
|
+
|
|
23
|
+
## Baseline Freeze
|
|
24
|
+
- Baseline commits: `audit/evidence/runtime/baseline-commits.txt`
|
|
25
|
+
- Environment metadata: `audit/evidence/runtime/environment.txt`
|
|
26
|
+
- DB adapter assumptions: `audit/evidence/runtime/db-adapter-assumptions.txt`
|
|
27
|
+
- Standards/competitor corpus freeze: `audit/evidence/external/corpus-freeze.md`
|
|
28
|
+
|
|
29
|
+
## Evidence Policy
|
|
30
|
+
1. No claim without file-level and/or runtime/test evidence reference.
|
|
31
|
+
2. No high-severity risk without corroborating runtime/test signal.
|
|
32
|
+
3. Critical files require dual-pass review (pass 1 + cross-review pass 2).
|
|
33
|
+
4. Assertions must be tagged as:
|
|
34
|
+
- `Verified`: directly confirmed by code/runtime/test evidence.
|
|
35
|
+
- `Inferred`: logically derived from verified evidence.
|
|
36
|
+
- `Unknown`: evidence missing or inconclusive.
|
|
37
|
+
5. Unknowns are tracked explicitly in subsystem reports and findings.
|
|
38
|
+
|
|
39
|
+
## Severity Model
|
|
40
|
+
- Inputs:
|
|
41
|
+
- Impact: `1-5`
|
|
42
|
+
- Likelihood: `1-5`
|
|
43
|
+
- Detectability: `1-5` (higher means easier to detect)
|
|
44
|
+
- Formula:
|
|
45
|
+
- `severity_score = impact * likelihood * (6 - detectability)`
|
|
46
|
+
- Range: `1..125`
|
|
47
|
+
- Bands:
|
|
48
|
+
- `High`: `>= 60`
|
|
49
|
+
- `Medium`: `30-59`
|
|
50
|
+
- `Low`: `< 30`
|
|
51
|
+
|
|
52
|
+
## Confidence Model
|
|
53
|
+
- `C1 Very Low`: weak signal, mostly inferred.
|
|
54
|
+
- `C2 Low`: limited direct evidence.
|
|
55
|
+
- `C3 Medium`: direct code evidence + partial corroboration.
|
|
56
|
+
- `C4 High`: direct code evidence + test/runtime corroboration.
|
|
57
|
+
- `C5 Very High`: repeated corroboration across code, runtime, and tests.
|
|
58
|
+
|
|
59
|
+
## Scoring Model
|
|
60
|
+
Each major dimension scored `1-5`, evidence-backed:
|
|
61
|
+
- Correctness
|
|
62
|
+
- Security
|
|
63
|
+
- Resilience
|
|
64
|
+
- Performance
|
|
65
|
+
- Maintainability
|
|
66
|
+
- Observability
|
|
67
|
+
- Test quality
|
|
68
|
+
|
|
69
|
+
Aggregate score is reported as profile (not single opaque number) plus weighted composite:
|
|
70
|
+
- Correctness `20%`
|
|
71
|
+
- Security `20%`
|
|
72
|
+
- Resilience `15%`
|
|
73
|
+
- Performance `15%`
|
|
74
|
+
- Maintainability `15%`
|
|
75
|
+
- Observability `5%`
|
|
76
|
+
- Test quality `10%`
|
|
77
|
+
|
|
78
|
+
## Deliverables
|
|
79
|
+
- `audit/00-charter.md`
|
|
80
|
+
- `audit/01-scope-map.md`
|
|
81
|
+
- `audit/02-coverage-matrix.csv`
|
|
82
|
+
- `audit/03-invariants.md`
|
|
83
|
+
- `audit/04-standards-rubric.md`
|
|
84
|
+
- `audit/05-competitor-rubric.md`
|
|
85
|
+
- `audit/06-findings.md`
|
|
86
|
+
- `audit/07-risk-register.csv`
|
|
87
|
+
- `audit/08-remediation-roadmap.md`
|
|
88
|
+
- `audit/subsystems/*.md`
|
|
89
|
+
- `audit/traces/*.md`
|
|
90
|
+
- `audit/evidence/**`
|
|
91
|
+
|
|
92
|
+
## Signoff Criteria
|
|
93
|
+
1. 100% critical-file dual-pass coverage.
|
|
94
|
+
2. 100% invariants not left unknown in final state.
|
|
95
|
+
3. 100% high-severity risks have mitigation + verification test.
|
|
96
|
+
4. Standards and competitor matrices complete with evidence.
|
|
97
|
+
5. Prioritized remediation roadmap with exit criteria.
|
|
98
|
+
6. Final synthesis includes residual risk and confidence summary.
|
|
99
|
+
|
|
100
|
+
## Reproducibility Commands (Baseline)
|
|
101
|
+
- `git rev-parse HEAD` in each repo.
|
|
102
|
+
- `node -v && npm -v && uname -a`
|
|
103
|
+
- `git ls-files` inventories captured under `audit/evidence/code/`.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Scope Map (M1)
|
|
2
|
+
|
|
3
|
+
## Inventory Baseline (In Scope)
|
|
4
|
+
- `json-rest-api`: 160 tracked files in scope (`audit/evidence/code/in-scope-files-json-rest-api.txt`)
|
|
5
|
+
- `json-rest-schema`: 13 tracked files in scope (`audit/evidence/code/in-scope-files-json-rest-schema.txt`)
|
|
6
|
+
- Coverage matrix rows: 173 files + header (`audit/02-coverage-matrix.csv`)
|
|
7
|
+
|
|
8
|
+
## Architecture Boundaries (Expected Layer Contract)
|
|
9
|
+
`transport -> REST methods -> helper contracts -> storage adapter -> DB`
|
|
10
|
+
|
|
11
|
+
### schema-core
|
|
12
|
+
- Repo: `json-rest-schema`
|
|
13
|
+
- Core files: `src/index.js`, `src/Schema.js`, `src/CorePlugin.js`
|
|
14
|
+
- Responsibility: field casting, validation pipeline, validator/type plugin system.
|
|
15
|
+
|
|
16
|
+
### rest-orchestration
|
|
17
|
+
- Repo: `json-rest-api`
|
|
18
|
+
- Core files: `plugins/core/rest-api-plugin.js`, `plugins/core/rest-api-plugin-methods/*.js`, `plugins/core/rest-api-plugin-hooks/*.js`
|
|
19
|
+
- Responsibility: request lifecycle orchestration, permission hook dispatch, transaction lifecycle, response shape mode.
|
|
20
|
+
|
|
21
|
+
### transport-express
|
|
22
|
+
- Core files: `plugins/core/connectors/express-plugin.js`, `plugins/core/connectors/lib/*`
|
|
23
|
+
- Responsibility: HTTP ingress/egress, request parsing, status mapping, transport hooks.
|
|
24
|
+
|
|
25
|
+
### storage-knex
|
|
26
|
+
- Core files: `plugins/core/rest-api-knex-plugin.js`, `plugins/core/lib/storage/storage-adapter.js`, `plugins/core/lib/querying-writing/*`
|
|
27
|
+
- Responsibility: data adapter abstraction, SQL query/write execution, schema compilation and ID/column translation.
|
|
28
|
+
|
|
29
|
+
### query-engine
|
|
30
|
+
- Core files: `plugins/core/lib/querying/*`, `plugins/core/rest-api-plugin-methods/query.js`, `.../get.js`
|
|
31
|
+
- Responsibility: filtering/sorting/pagination/include processing and JSON:API assembly.
|
|
32
|
+
|
|
33
|
+
### relationships
|
|
34
|
+
- Core files: `plugins/core/lib/writing/relationship-processor.js`, `.../many-to-many-manipulations.js`, relationship endpoint methods
|
|
35
|
+
- Responsibility: relation semantics across CRUD + relationship endpoints.
|
|
36
|
+
|
|
37
|
+
### plugin subsystems
|
|
38
|
+
- Access: `plugins/core/rest-api-access.js`
|
|
39
|
+
- CORS: `plugins/core/rest-api-cors-plugin.js`
|
|
40
|
+
- File: `plugins/core/file-handling-plugin.js`
|
|
41
|
+
- Positioning: `plugins/core/rest-api-positioning-plugin.js`, `plugins/core/lib/fractional-positioning.js`
|
|
42
|
+
- Multihome: `plugins/core/rest-api-multihome-plugin.js`
|
|
43
|
+
- SocketIO: `plugins/core/socketio-plugin.js`
|
|
44
|
+
- Bulk: `plugins/core/bulk-operations-plugin.js`
|
|
45
|
+
|
|
46
|
+
## Primary Data/Control Flows
|
|
47
|
+
### Read flow
|
|
48
|
+
1. Route registration: `register-scope-routes.js` + `add-route.js`
|
|
49
|
+
2. Transport ingress + parsing: `express-plugin.js`, `connectors-query-parser.js`
|
|
50
|
+
3. Method orchestration: `query.js`/`get.js` -> payload validation -> `checkPermissions`
|
|
51
|
+
4. Storage read: `rest-api-knex-plugin.js` (`helpers.dataQuery`/`helpers.dataGet`)
|
|
52
|
+
5. Include/transform: `knex-process-includes.js`, `knex-relationship-includes.js`, `knex-json-api-transformers-querying.js`
|
|
53
|
+
6. Field enrichment/filtering: `enrich-attributes.js`, `field-utils.js`
|
|
54
|
+
7. Transport response/error mapping: `express-plugin.js`
|
|
55
|
+
|
|
56
|
+
### Write flow
|
|
57
|
+
1. Transport ingress/body validation.
|
|
58
|
+
2. Method setup + transaction open: `common.js::setupCommonRequest`
|
|
59
|
+
3. Payload validation and schema validation: `payload-validators.js` + `validateResourceAttributesBeforeWrite`
|
|
60
|
+
4. Permission checks before storage side effects: `scope.checkPermissions`
|
|
61
|
+
5. Storage mutation: `helpers.dataPost|dataPut|dataPatch|dataDelete`
|
|
62
|
+
6. Relationship side effects: `relationship-processor.js`, `many-to-many-manipulations.js`
|
|
63
|
+
7. Return mode and hooks: `handleRecordReturnAfterWrite`
|
|
64
|
+
8. Commit/rollback path: `common.js::handleWriteMethodError` and method-level transaction logic
|
|
65
|
+
|
|
66
|
+
## Early Silent Zones (Initial Detection)
|
|
67
|
+
### Files with weak direct test linkage (heuristic)
|
|
68
|
+
- Source: `audit/evidence/code/early-silent-zones-no-test-token.txt`
|
|
69
|
+
- 54/67 runtime files had no direct token mention in tests (heuristic, not execution coverage).
|
|
70
|
+
- Notable high-risk modules in this set: file upload detector libs, relationship endpoint methods, core helper glue, error formatting.
|
|
71
|
+
|
|
72
|
+
### Docs claims with likely weak direct code/test mapping (to validate in M2/M6)
|
|
73
|
+
- File upload guides vs no dedicated file-upload test suite name match.
|
|
74
|
+
- Label plugin present (`rest-api-label-plugin.js`) with no dedicated test suite name match.
|
|
75
|
+
- Transport helper internals (`connectors/lib/*`) lack targeted test files by name.
|
|
76
|
+
|
|
77
|
+
### Weak call-site coverage candidates (initial static signal)
|
|
78
|
+
- Relationship endpoint error path consistency needs runtime confirmation (`patch-relationship.js` catch path references symbols not declared in-file).
|
|
79
|
+
- Cross-table/polymorphic filter branches require targeted scenario coverage beyond happy-path query tests.
|
|
80
|
+
|
|
81
|
+
## Unknown Queue (Must Resolve)
|
|
82
|
+
- Exact runtime path usage for some helper modules without explicit test targeting.
|
|
83
|
+
- Relationship endpoint error envelope consistency under thrown failures.
|
|
84
|
+
- Performance behavior under nested includes and cross-table filter combinations.
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"repo","path","layer","subsystem","criticality","review_pass_1","review_pass_2","runtime_touched","test_touched","notes_ref"
|
|
2
|
+
"json-rest-api",".claude/agents/library-guide-expert.md","support","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
3
|
+
"json-rest-api",".claude/agents/rest-api-internals-expert.md","support","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
4
|
+
"json-rest-api",".gitignore","support","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
5
|
+
"json-rest-api","AGENTS.md","docs","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
6
|
+
"json-rest-api","CLAUDE.md","docs","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
7
|
+
"json-rest-api","connectors_ideas/fastify.js","tooling","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
8
|
+
"json-rest-api","connectors_ideas/koa-plugin.js","tooling","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
9
|
+
"json-rest-api","CRUSH.md","docs","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
10
|
+
"json-rest-api","docs/_config.yml","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
11
|
+
"json-rest-api","docs/_layouts/default.html","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
12
|
+
"json-rest-api","docs/.bundle/config","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
13
|
+
"json-rest-api","docs/API.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
14
|
+
"json-rest-api","docs/apple-touch-icon.svg","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
15
|
+
"json-rest-api","docs/assets/css/style.scss","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
16
|
+
"json-rest-api","docs/COMPARISON.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
17
|
+
"json-rest-api","docs/favicon.svg","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
18
|
+
"json-rest-api","docs/Gemfile","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
19
|
+
"json-rest-api","docs/Gemfile.lock","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
20
|
+
"json-rest-api","docs/GUIDE/GUIDE_1_Initial_Setup.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
21
|
+
"json-rest-api","docs/GUIDE/GUIDE_2_1_The_Starting_Point.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
22
|
+
"json-rest-api","docs/GUIDE/GUIDE_2_2_Manipulating_And_Searching_Tables.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
23
|
+
"json-rest-api","docs/GUIDE/GUIDE_2_3_BelongsTo_Relationships.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
24
|
+
"json-rest-api","docs/GUIDE/GUIDE_2_4_HasMany_Records.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
25
|
+
"json-rest-api","docs/GUIDE/GUIDE_2_5_HasMany_Polymorphic.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
26
|
+
"json-rest-api","docs/GUIDE/GUIDE_2_6_Many_To_Many.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
27
|
+
"json-rest-api","docs/GUIDE/GUIDE_2_7_Pagination_And_Ordering.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
28
|
+
"json-rest-api","docs/GUIDE/GUIDE_2_8_Effects_of_PUT_and_PATCH.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
29
|
+
"json-rest-api","docs/GUIDE/GUIDE_2_9_Relationships_Urls.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
30
|
+
"json-rest-api","docs/GUIDE/GUIDE_2_Data_And_Relations.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
31
|
+
"json-rest-api","docs/GUIDE/GUIDE_3_Field_Transformations.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
32
|
+
"json-rest-api","docs/GUIDE/GUIDE_4_Authentication_And_Permissions.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
33
|
+
"json-rest-api","docs/GUIDE/GUIDE_5_Non-Db_Resources.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
34
|
+
"json-rest-api","docs/GUIDE/GUIDE_6_Positioning.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
35
|
+
"json-rest-api","docs/GUIDE/GUIDE_7_Hooks_Data_Management_And_Plugins.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
36
|
+
"json-rest-api","docs/GUIDE/GUIDE_X_Bulk_Operations.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
37
|
+
"json-rest-api","docs/GUIDE/GUIDE_X_Cors.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
38
|
+
"json-rest-api","docs/GUIDE/GUIDE_X_File_Uploads.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
39
|
+
"json-rest-api","docs/GUIDE/GUIDE_X_Multihome.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
40
|
+
"json-rest-api","docs/GUIDE/GUIDE_X_SocketIO.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
41
|
+
"json-rest-api","docs/GUIDE/GUIDE_X_URL_Management.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
42
|
+
"json-rest-api","docs/GUIDE/GUIDE_Y_Appendices.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
43
|
+
"json-rest-api","docs/GUIDE/index.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
44
|
+
"json-rest-api","docs/index.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
45
|
+
"json-rest-api","docs/mini-guides/file-uploads-complete.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
46
|
+
"json-rest-api","docs/ONBOARDING.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
47
|
+
"json-rest-api","docs/QUICKSTART.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
48
|
+
"json-rest-api","eslint.config.js","meta","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
49
|
+
"json-rest-api","examples/url-override-example.js","tooling","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
50
|
+
"json-rest-api","index.js","runtime-core","rest-orchestration","important","pending","pending","no","no","audit/subsystems/rest-orchestration.md"
|
|
51
|
+
"json-rest-api","lib/enhanced-logger.js","runtime-core","rest-orchestration","important","pending","pending","no","no","audit/subsystems/rest-orchestration.md"
|
|
52
|
+
"json-rest-api","lib/error-formatter.js","runtime-core","rest-orchestration","important","pending","pending","no","no","audit/subsystems/rest-orchestration.md"
|
|
53
|
+
"json-rest-api","lib/rest-api-errors.js","runtime-core","rest-orchestration","important","pending","pending","no","no","audit/subsystems/rest-orchestration.md"
|
|
54
|
+
"json-rest-api","LICENSE","support","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
55
|
+
"json-rest-api","package-lock.json","meta","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
56
|
+
"json-rest-api","package.json","meta","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
57
|
+
"json-rest-api","plugins/core/bulk-operations-plugin.js","plugin","plugins-bulk","critical","yes","yes","yes","yes","audit/subsystems/plugins-bulk.md"
|
|
58
|
+
"json-rest-api","plugins/core/connectors/express-plugin.js","transport","transport-express","critical","yes","yes","yes","yes","audit/subsystems/transport-express.md"
|
|
59
|
+
"json-rest-api","plugins/core/connectors/lib/busboy-detector.js","transport","transport-express","critical","yes","yes","no","no","audit/subsystems/transport-express.md"
|
|
60
|
+
"json-rest-api","plugins/core/connectors/lib/formidable-detector.js","transport","transport-express","critical","yes","yes","no","no","audit/subsystems/transport-express.md"
|
|
61
|
+
"json-rest-api","plugins/core/connectors/lib/request-helpers.js","transport","transport-express","critical","yes","yes","no","no","audit/subsystems/transport-express.md"
|
|
62
|
+
"json-rest-api","plugins/core/file-handling-plugin.js","plugin","plugins-file","critical","yes","yes","no","no","audit/subsystems/plugins-file.md"
|
|
63
|
+
"json-rest-api","plugins/core/lib/dbTablesOperations.js","runtime-storage","storage-knex","critical","yes","yes","no","no","audit/subsystems/storage-knex.md"
|
|
64
|
+
"json-rest-api","plugins/core/lib/fractional-positioning.js","plugin","plugins-positioning","critical","yes","yes","no","no","audit/subsystems/plugins-positioning.md"
|
|
65
|
+
"json-rest-api","plugins/core/lib/querying-writing/compile-schemas.js","runtime-storage","storage-knex","critical","yes","yes","yes","yes","audit/subsystems/storage-knex.md"
|
|
66
|
+
"json-rest-api","plugins/core/lib/querying-writing/connectors-query-parser.js","runtime-storage","storage-knex","critical","yes","yes","no","no","audit/subsystems/storage-knex.md"
|
|
67
|
+
"json-rest-api","plugins/core/lib/querying-writing/database-capabilities.js","runtime-storage","storage-knex","critical","yes","yes","no","no","audit/subsystems/storage-knex.md"
|
|
68
|
+
"json-rest-api","plugins/core/lib/querying-writing/database-value-normalizers.js","runtime-storage","storage-knex","critical","yes","yes","no","no","audit/subsystems/storage-knex.md"
|
|
69
|
+
"json-rest-api","plugins/core/lib/querying-writing/default-data-helpers.js","runtime-storage","storage-knex","critical","yes","yes","no","no","audit/subsystems/storage-knex.md"
|
|
70
|
+
"json-rest-api","plugins/core/lib/querying-writing/field-utils.js","runtime-storage","storage-knex","critical","yes","yes","no","no","audit/subsystems/storage-knex.md"
|
|
71
|
+
"json-rest-api","plugins/core/lib/querying-writing/knex-constants.js","runtime-storage","storage-knex","critical","yes","yes","no","no","audit/subsystems/storage-knex.md"
|
|
72
|
+
"json-rest-api","plugins/core/lib/querying-writing/knex-field-helpers.js","runtime-storage","storage-knex","critical","yes","yes","yes","yes","audit/subsystems/storage-knex.md"
|
|
73
|
+
"json-rest-api","plugins/core/lib/querying-writing/knex-json-api-transformers.js","runtime-storage","storage-knex","critical","yes","yes","no","no","audit/subsystems/storage-knex.md"
|
|
74
|
+
"json-rest-api","plugins/core/lib/querying-writing/payload-validators.js","runtime-storage","storage-knex","critical","yes","yes","yes","yes","audit/subsystems/storage-knex.md"
|
|
75
|
+
"json-rest-api","plugins/core/lib/querying-writing/schema-helpers.js","runtime-storage","storage-knex","critical","yes","yes","no","no","audit/subsystems/storage-knex.md"
|
|
76
|
+
"json-rest-api","plugins/core/lib/querying-writing/scope-validations.js","runtime-storage","storage-knex","critical","yes","yes","no","no","audit/subsystems/storage-knex.md"
|
|
77
|
+
"json-rest-api","plugins/core/lib/querying-writing/simplified-helpers.js","runtime-storage","storage-knex","critical","yes","yes","no","no","audit/subsystems/storage-knex.md"
|
|
78
|
+
"json-rest-api","plugins/core/lib/querying/knex-cross-table-search.js","runtime-query","query-engine","critical","yes","yes","no","no","audit/subsystems/query-engine.md"
|
|
79
|
+
"json-rest-api","plugins/core/lib/querying/knex-json-api-transformers-querying.js","runtime-query","query-engine","critical","yes","yes","no","no","audit/subsystems/query-engine.md"
|
|
80
|
+
"json-rest-api","plugins/core/lib/querying/knex-pagination-helpers.js","runtime-query","query-engine","critical","yes","yes","no","no","audit/subsystems/query-engine.md"
|
|
81
|
+
"json-rest-api","plugins/core/lib/querying/knex-process-includes.js","runtime-query","query-engine","critical","yes","yes","no","no","audit/subsystems/query-engine.md"
|
|
82
|
+
"json-rest-api","plugins/core/lib/querying/knex-query-helpers-base.js","runtime-query","query-engine","critical","yes","yes","no","no","audit/subsystems/query-engine.md"
|
|
83
|
+
"json-rest-api","plugins/core/lib/querying/knex-query-helpers.js","runtime-query","query-engine","critical","yes","yes","no","no","audit/subsystems/query-engine.md"
|
|
84
|
+
"json-rest-api","plugins/core/lib/querying/knex-relationship-includes.js","runtime-query","query-engine","critical","yes","yes","yes","yes","audit/subsystems/query-engine.md"
|
|
85
|
+
"json-rest-api","plugins/core/lib/querying/knex-window-queries.js","runtime-query","query-engine","critical","yes","yes","no","no","audit/subsystems/query-engine.md"
|
|
86
|
+
"json-rest-api","plugins/core/lib/querying/url-helpers.js","runtime-query","query-engine","critical","yes","yes","no","no","audit/subsystems/query-engine.md"
|
|
87
|
+
"json-rest-api","plugins/core/lib/storage/storage-adapter.js","runtime-storage","storage-knex","critical","yes","yes","no","no","audit/subsystems/storage-knex.md"
|
|
88
|
+
"json-rest-api","plugins/core/lib/writing/knex-json-api-transformers-writing.js","support","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
89
|
+
"json-rest-api","plugins/core/lib/writing/many-to-many-manipulations.js","runtime-relationships","relationships","critical","yes","yes","yes","yes","audit/subsystems/relationships.md"
|
|
90
|
+
"json-rest-api","plugins/core/lib/writing/relationship-processor.js","runtime-relationships","relationships","critical","yes","yes","yes","yes","audit/subsystems/relationships.md"
|
|
91
|
+
"json-rest-api","plugins/core/rest-api-access.js","plugin","plugins-access","critical","yes","yes","yes","yes","audit/subsystems/plugins-access.md"
|
|
92
|
+
"json-rest-api","plugins/core/rest-api-cors-plugin.js","plugin","plugins-cors","critical","yes","yes","yes","yes","audit/subsystems/plugins-cors.md"
|
|
93
|
+
"json-rest-api","plugins/core/rest-api-knex-plugin.js","runtime-storage","storage-knex","critical","yes","yes","yes","yes","audit/subsystems/storage-knex.md"
|
|
94
|
+
"json-rest-api","plugins/core/rest-api-label-plugin.js","support","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
95
|
+
"json-rest-api","plugins/core/rest-api-multihome-plugin.js","plugin","plugins-multihome","critical","yes","yes","yes","yes","audit/subsystems/plugins-multihome.md"
|
|
96
|
+
"json-rest-api","plugins/core/rest-api-plugin-hooks/compile-resource-schemas.js","runtime-orchestration","rest-orchestration","critical","yes","yes","no","no","audit/subsystems/rest-orchestration.md"
|
|
97
|
+
"json-rest-api","plugins/core/rest-api-plugin-hooks/register-relationship-routes.js","runtime-orchestration","rest-orchestration","critical","yes","yes","no","no","audit/subsystems/rest-orchestration.md"
|
|
98
|
+
"json-rest-api","plugins/core/rest-api-plugin-hooks/register-scope-routes.js","runtime-orchestration","rest-orchestration","critical","yes","yes","no","no","audit/subsystems/rest-orchestration.md"
|
|
99
|
+
"json-rest-api","plugins/core/rest-api-plugin-hooks/turn-scope-init-into-vars.js","runtime-orchestration","rest-orchestration","critical","yes","yes","no","no","audit/subsystems/rest-orchestration.md"
|
|
100
|
+
"json-rest-api","plugins/core/rest-api-plugin-hooks/validate-include-configurations.js","runtime-orchestration","rest-orchestration","critical","yes","yes","no","no","audit/subsystems/rest-orchestration.md"
|
|
101
|
+
"json-rest-api","plugins/core/rest-api-plugin-methods/add-route.js","runtime-orchestration","rest-orchestration","critical","yes","yes","no","no","audit/subsystems/rest-orchestration.md"
|
|
102
|
+
"json-rest-api","plugins/core/rest-api-plugin-methods/check-permissions.js","runtime-orchestration","rest-orchestration","critical","yes","yes","no","no","audit/subsystems/rest-orchestration.md"
|
|
103
|
+
"json-rest-api","plugins/core/rest-api-plugin-methods/common.js","runtime-orchestration","rest-orchestration","critical","yes","yes","yes","yes","audit/subsystems/rest-orchestration.md"
|
|
104
|
+
"json-rest-api","plugins/core/rest-api-plugin-methods/delete-relationship.js","runtime-relationships","relationships","critical","yes","yes","yes","yes","audit/subsystems/relationships.md"
|
|
105
|
+
"json-rest-api","plugins/core/rest-api-plugin-methods/delete.js","runtime-orchestration","rest-orchestration","critical","yes","yes","yes","yes","audit/subsystems/rest-orchestration.md"
|
|
106
|
+
"json-rest-api","plugins/core/rest-api-plugin-methods/enrich-attributes.js","runtime-orchestration","rest-orchestration","critical","yes","yes","no","no","audit/subsystems/rest-orchestration.md"
|
|
107
|
+
"json-rest-api","plugins/core/rest-api-plugin-methods/get-related.js","runtime-relationships","relationships","critical","yes","yes","yes","yes","audit/subsystems/relationships.md"
|
|
108
|
+
"json-rest-api","plugins/core/rest-api-plugin-methods/get-relationship.js","runtime-relationships","relationships","critical","yes","yes","yes","yes","audit/subsystems/relationships.md"
|
|
109
|
+
"json-rest-api","plugins/core/rest-api-plugin-methods/get.js","runtime-orchestration","rest-orchestration","critical","yes","yes","yes","yes","audit/subsystems/rest-orchestration.md"
|
|
110
|
+
"json-rest-api","plugins/core/rest-api-plugin-methods/patch-relationship.js","runtime-relationships","relationships","critical","yes","yes","yes","yes","audit/subsystems/relationships.md"
|
|
111
|
+
"json-rest-api","plugins/core/rest-api-plugin-methods/patch.js","runtime-orchestration","rest-orchestration","critical","yes","yes","yes","yes","audit/subsystems/rest-orchestration.md"
|
|
112
|
+
"json-rest-api","plugins/core/rest-api-plugin-methods/post-relationship.js","runtime-relationships","relationships","critical","yes","yes","yes","yes","audit/subsystems/relationships.md"
|
|
113
|
+
"json-rest-api","plugins/core/rest-api-plugin-methods/post.js","runtime-orchestration","rest-orchestration","critical","yes","yes","yes","yes","audit/subsystems/rest-orchestration.md"
|
|
114
|
+
"json-rest-api","plugins/core/rest-api-plugin-methods/put.js","runtime-orchestration","rest-orchestration","critical","yes","yes","yes","yes","audit/subsystems/rest-orchestration.md"
|
|
115
|
+
"json-rest-api","plugins/core/rest-api-plugin-methods/query.js","runtime-query","query-engine","critical","yes","yes","yes","yes","audit/subsystems/query-engine.md"
|
|
116
|
+
"json-rest-api","plugins/core/rest-api-plugin-methods/release.js","runtime-orchestration","rest-orchestration","critical","yes","yes","no","no","audit/subsystems/rest-orchestration.md"
|
|
117
|
+
"json-rest-api","plugins/core/rest-api-plugin.js","runtime-orchestration","rest-orchestration","critical","yes","yes","yes","yes","audit/subsystems/rest-orchestration.md"
|
|
118
|
+
"json-rest-api","plugins/core/rest-api-positioning-plugin.js","plugin","plugins-positioning","critical","yes","yes","yes","yes","audit/subsystems/plugins-positioning.md"
|
|
119
|
+
"json-rest-api","plugins/core/socketio-plugin.js","plugin","plugins-socketio","critical","yes","yes","yes","yes","audit/subsystems/plugins-socketio.md"
|
|
120
|
+
"json-rest-api","plugins/storage/local-storage.js","plugin","plugins-file","critical","yes","yes","no","no","audit/subsystems/plugins-file.md"
|
|
121
|
+
"json-rest-api","plugins/storage/s3-storage.js","plugin","plugins-file","critical","yes","yes","no","no","audit/subsystems/plugins-file.md"
|
|
122
|
+
"json-rest-api","quickTest.js","tooling","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
123
|
+
"json-rest-api","README.md","docs","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
124
|
+
"json-rest-api","scripts/run-docs.js","tooling","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
125
|
+
"json-rest-api","test-debug.js","tooling","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
126
|
+
"json-rest-api","tests/bulk-operations.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
127
|
+
"json-rest-api","tests/computed-fields.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
128
|
+
"json-rest-api","tests/cors.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
129
|
+
"json-rest-api","tests/curl.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
130
|
+
"json-rest-api","tests/custom-idproperty-relationships.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
131
|
+
"json-rest-api","tests/field-getters.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
132
|
+
"json-rest-api","tests/field-setters.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
133
|
+
"json-rest-api","tests/fixtures/api-configs.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
134
|
+
"json-rest-api","tests/helpers/storage-mode.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
135
|
+
"json-rest-api","tests/helpers/test-utils.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
136
|
+
"json-rest-api","tests/include-depth-validation.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
137
|
+
"json-rest-api","tests/includes.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
138
|
+
"json-rest-api","tests/multihome.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
139
|
+
"json-rest-api","tests/nested-includes.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
140
|
+
"json-rest-api","tests/ownership-optout.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
141
|
+
"json-rest-api","tests/pagination-cursor-multifield.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
142
|
+
"json-rest-api","tests/pagination-enhanced.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
143
|
+
"json-rest-api","tests/polymorphic-relationships.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
144
|
+
"json-rest-api","tests/polymorphic-simple.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
145
|
+
"json-rest-api","tests/positioning-advanced.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
146
|
+
"json-rest-api","tests/positioning-extended.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
147
|
+
"json-rest-api","tests/positioning-multifilter.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
148
|
+
"json-rest-api","tests/positioning.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
149
|
+
"json-rest-api","tests/queries.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
150
|
+
"json-rest-api","tests/query-limits.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
151
|
+
"json-rest-api","tests/README.md","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
152
|
+
"json-rest-api","tests/relationship-endpoints.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
153
|
+
"json-rest-api","tests/relationships.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
154
|
+
"json-rest-api","tests/rest-api-access.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
155
|
+
"json-rest-api","tests/rest-api.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
156
|
+
"json-rest-api","tests/searchschema-merge.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
157
|
+
"json-rest-api","tests/socketio.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
158
|
+
"json-rest-api","tests/TEST_TEMPLATE.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
159
|
+
"json-rest-api","tests/test-development-guide.md","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
160
|
+
"json-rest-api","tests/virtual-fields.test.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
161
|
+
"json-rest-api","TODO.todo","meta","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
162
|
+
"json-rest-schema",".gitignore","support","docs-drift","supporting","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
163
|
+
"json-rest-schema","eslint.config.js","meta","schema-core","supporting","pending","pending","no","no","audit/subsystems/schema-core.md"
|
|
164
|
+
"json-rest-schema","example.js","meta","schema-core","supporting","pending","pending","no","no","audit/subsystems/schema-core.md"
|
|
165
|
+
"json-rest-schema","FUTURE_MIGRATION_MODULE.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
166
|
+
"json-rest-schema","ONBOARDING.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
167
|
+
"json-rest-schema","package-lock.json","meta","schema-core","supporting","pending","pending","no","no","audit/subsystems/schema-core.md"
|
|
168
|
+
"json-rest-schema","package.json","meta","schema-core","supporting","pending","pending","no","no","audit/subsystems/schema-core.md"
|
|
169
|
+
"json-rest-schema","README.md","docs","docs-drift","important","pending","pending","no","no","audit/subsystems/docs-drift.md"
|
|
170
|
+
"json-rest-schema","src/CorePlugin.js","schema-runtime","schema-core","critical","yes","yes","yes","yes","audit/subsystems/schema-core.md"
|
|
171
|
+
"json-rest-schema","src/index.js","schema-runtime","schema-core","critical","yes","yes","yes","yes","audit/subsystems/schema-core.md"
|
|
172
|
+
"json-rest-schema","src/Schema.js","schema-runtime","schema-core","critical","yes","yes","yes","yes","audit/subsystems/schema-core.md"
|
|
173
|
+
"json-rest-schema","test-knex-table-real.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
174
|
+
"json-rest-schema","tests.js","tests","tests","important","pending","pending","no","no","audit/subsystems/tests.md"
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Architecture Invariants (Final, non-anyapi)
|
|
2
|
+
|
|
3
|
+
Scope note: anyapi-specific code paths are excluded from invariant evaluation.
|
|
4
|
+
Status legend: `pass | fail | partial`.
|
|
5
|
+
Assertion tags: `[Verified]`, `[Inferred]`.
|
|
6
|
+
|
|
7
|
+
## Summary Table
|
|
8
|
+
|
|
9
|
+
| Invariant | Status | Confidence | Key evidence |
|
|
10
|
+
|---|---|---:|---|
|
|
11
|
+
| INV-001 Transactional mutation + rollback safety | fail | C5 | `patchRelationship` runtime `ReferenceError` in error path; catch handler broken |
|
|
12
|
+
| INV-002 Permission checks before irreversible side effects | pass | C4 | method ordering + access/multihome tests |
|
|
13
|
+
| INV-003 Validation/type normalization before query/write | pass | C4 | payload validators before data helpers; runtime malformed payload rejection |
|
|
14
|
+
| INV-004 Relationship semantics consistency across write + relationship endpoints | partial | C4 | post/delete endpoint pass + patch endpoint error-path defect |
|
|
15
|
+
| INV-005 idProperty consistency in query/write/transform/response | pass | C4 | compile + knex idProperty paths + custom idProperty tests |
|
|
16
|
+
| INV-006 Sparse fieldsets do not leak hidden/internal fields | pass | C4 | field helper behavior + virtual/computed/fieldset tests |
|
|
17
|
+
| INV-007 Include processing avoids N+1 in standard scenarios | partial | C3 | include correctness tests pass; no query-count budget assertions |
|
|
18
|
+
| INV-008 Error envelope consistency across transport and method paths | fail | C4 | CORS blocked-origin envelope mismatch + patchRelationship error-path mismatch |
|
|
19
|
+
| INV-009 Multi-tenant/ownership filters non-bypassable across alternate paths | partial | C3 | access/multihome checks pass; bypass matrix not exhaustive |
|
|
20
|
+
| INV-010 Plugin side effects scoped and contract-safe | partial | C4 | positioning test failures + inferred bulk optimization dead-path |
|
|
21
|
+
| INV-011 Docs claims match observed critical behavior | partial | C4 | `included` write docs/code mismatch; compliance wording drift |
|
|
22
|
+
| INV-012 Tests cover critical invariants (not just happy paths) | partial | C4 | broad suite + explicit gaps (skipped tests, missing patchRelationship regression) |
|
|
23
|
+
|
|
24
|
+
## INV-001 Transactional mutation + rollback safety
|
|
25
|
+
- [Verified][C5] `patch-relationship` catch path references undefined `handleWriteMethodError`, breaking canonical rollback/error handler path.
|
|
26
|
+
- Code evidence:
|
|
27
|
+
- [patch-relationship.js:52](/home/merc/Development/current/json-rest-api/plugins/core/rest-api-plugin-methods/patch-relationship.js:52)
|
|
28
|
+
- [common.js:198](/home/merc/Development/current/json-rest-api/plugins/core/rest-api-plugin-methods/common.js:198)
|
|
29
|
+
- Runtime evidence:
|
|
30
|
+
- [probe-patch-relationship-referenceerror.log](/home/merc/Development/current/json-rest-api/audit/evidence/runtime/probe-patch-relationship-referenceerror.log)
|
|
31
|
+
- Existing tests mapped:
|
|
32
|
+
- `tests/relationship-endpoints.test.js` covers post/delete but not patch failure path.
|
|
33
|
+
- Scenario validation:
|
|
34
|
+
- malformed relationship payload -> `ReferenceError: handleWriteMethodError is not defined`.
|
|
35
|
+
- Final: `fail`.
|
|
36
|
+
- Remediation pointer: `ROADMAP-A-001`.
|
|
37
|
+
|
|
38
|
+
## INV-002 Permission checks before irreversible side effects
|
|
39
|
+
- [Verified][C4] CRUD method paths call `scope.checkPermissions` before `helpers.dataPost|Put|Patch|Delete`.
|
|
40
|
+
- Code evidence: [post.js](/home/merc/Development/current/json-rest-api/plugins/core/rest-api-plugin-methods/post.js), [put.js](/home/merc/Development/current/json-rest-api/plugins/core/rest-api-plugin-methods/put.js), [patch.js](/home/merc/Development/current/json-rest-api/plugins/core/rest-api-plugin-methods/patch.js), [delete.js](/home/merc/Development/current/json-rest-api/plugins/core/rest-api-plugin-methods/delete.js).
|
|
41
|
+
- Test evidence: `tests/rest-api-access.test.js`, `tests/multihome.test.js`, `tests/ownership-optout.test.js` (all in full suite run).
|
|
42
|
+
- Final: `pass`.
|
|
43
|
+
|
|
44
|
+
## INV-003 Validation/type normalization before query construction and writes
|
|
45
|
+
- [Verified][C4] Method flows validate payload/query before storage helper calls.
|
|
46
|
+
- Code evidence: [payload-validators.js](/home/merc/Development/current/json-rest-api/plugins/core/lib/querying-writing/payload-validators.js), [query.js](/home/merc/Development/current/json-rest-api/plugins/core/rest-api-plugin-methods/query.js), [common.js](/home/merc/Development/current/json-rest-api/plugins/core/rest-api-plugin-methods/common.js).
|
|
47
|
+
- Runtime evidence: malformed relationship payload rejected in probe before successful write (`REST_API_PAYLOAD` emitted before endpoint-level failure masking).
|
|
48
|
+
- Final: `pass`.
|
|
49
|
+
|
|
50
|
+
## INV-004 Relationship semantics consistency across POST/PUT/PATCH + relationship endpoints
|
|
51
|
+
- [Verified][C4] POST/DELETE relationship endpoints pass in regression tests.
|
|
52
|
+
- [Verified][C5] PATCH relationship endpoint has broken failure semantics (`ReferenceError`).
|
|
53
|
+
- Evidence:
|
|
54
|
+
- [trace-relationship-endpoints.md](/home/merc/Development/current/json-rest-api/audit/traces/trace-relationship-endpoints.md)
|
|
55
|
+
- `audit/evidence/tests/npm-test-json-rest-api.log:5050,5060`
|
|
56
|
+
- Final: `partial`.
|
|
57
|
+
- Remediation pointer: `ROADMAP-A-001`, `ROADMAP-A-003`.
|
|
58
|
+
|
|
59
|
+
## INV-005 idProperty consistency in query/write/transform/response
|
|
60
|
+
- [Verified][C4] `idProperty` appears in compile metadata and knex read/write helpers.
|
|
61
|
+
- Code evidence: [compile-schemas.js](/home/merc/Development/current/json-rest-api/plugins/core/lib/querying-writing/compile-schemas.js), [rest-api-knex-plugin.js](/home/merc/Development/current/json-rest-api/plugins/core/rest-api-knex-plugin.js).
|
|
62
|
+
- Test evidence: `tests/custom-idproperty-relationships.test.js` passes in full run.
|
|
63
|
+
- Final: `pass`.
|
|
64
|
+
|
|
65
|
+
## INV-006 Sparse fieldsets do not leak hidden/internal fields
|
|
66
|
+
- [Verified][C4] field helper enforces hidden/sparse behavior and throws on unknown fields.
|
|
67
|
+
- Code evidence: [knex-field-helpers.js](/home/merc/Development/current/json-rest-api/plugins/core/lib/querying-writing/knex-field-helpers.js).
|
|
68
|
+
- Test evidence: `tests/virtual-fields.test.js`, `tests/computed-fields.test.js`, `tests/field-getters.test.js` pass in full suite.
|
|
69
|
+
- Final: `pass`.
|
|
70
|
+
|
|
71
|
+
## INV-007 Include processing avoids N+1 in standard scenarios
|
|
72
|
+
- [Verified][C3] include behavior is functionally correct in test suite.
|
|
73
|
+
- [Inferred][C3] batching present in include code; no direct query-count budget test.
|
|
74
|
+
- Evidence:
|
|
75
|
+
- [knex-relationship-includes.js](/home/merc/Development/current/json-rest-api/plugins/core/lib/querying/knex-relationship-includes.js)
|
|
76
|
+
- `tests/includes.test.js`, `tests/nested-includes.test.js`
|
|
77
|
+
- Final: `partial`.
|
|
78
|
+
- Remediation pointer: `ROADMAP-B-003`.
|
|
79
|
+
|
|
80
|
+
## INV-008 Error envelope consistency across transport and method paths
|
|
81
|
+
- [Verified][C4] CORS blocked-origin path returns `{ error: ... }` shape, diverging from JSON:API `errors` envelope.
|
|
82
|
+
- [Verified][C5] `patchRelationship` failure path returns runtime `ReferenceError` instead of normalized rest-api envelope.
|
|
83
|
+
- Evidence:
|
|
84
|
+
- [rest-api-cors-plugin.js:112](/home/merc/Development/current/json-rest-api/plugins/core/rest-api-cors-plugin.js:112)
|
|
85
|
+
- [probe-patch-relationship-referenceerror.log](/home/merc/Development/current/json-rest-api/audit/evidence/runtime/probe-patch-relationship-referenceerror.log)
|
|
86
|
+
- Final: `fail`.
|
|
87
|
+
- Remediation pointer: `ROADMAP-A-001`, `ROADMAP-B-002`.
|
|
88
|
+
|
|
89
|
+
## INV-009 Multi-tenant and ownership filters non-bypassable
|
|
90
|
+
- [Verified][C4] plugin-level filtering + permission checks exist and tests pass.
|
|
91
|
+
- [Inferred][C3] alternate-path bypass matrix (relationship endpoints + includes + custom filters) not exhaustively runtime-proven.
|
|
92
|
+
- Evidence:
|
|
93
|
+
- [rest-api-access.js](/home/merc/Development/current/json-rest-api/plugins/core/rest-api-access.js)
|
|
94
|
+
- [rest-api-multihome-plugin.js](/home/merc/Development/current/json-rest-api/plugins/core/rest-api-multihome-plugin.js)
|
|
95
|
+
- `tests/rest-api-access.test.js`, `tests/multihome.test.js`
|
|
96
|
+
- Final: `partial`.
|
|
97
|
+
- Remediation pointer: `ROADMAP-B-004`.
|
|
98
|
+
|
|
99
|
+
## INV-010 Plugin side effects remain scoped and contract-safe
|
|
100
|
+
- [Verified][C5] positioning plugin currently has failing multifilter edge tests.
|
|
101
|
+
- [Inferred][C3] bulk optimization hook may be non-executed/dead path.
|
|
102
|
+
- Evidence:
|
|
103
|
+
- `audit/evidence/tests/npm-test-json-rest-api.log:4235-4296`
|
|
104
|
+
- [bulk-operations-plugin.js](/home/merc/Development/current/json-rest-api/plugins/core/bulk-operations-plugin.js)
|
|
105
|
+
- Final: `partial`.
|
|
106
|
+
- Remediation pointer: `ROADMAP-A-002`, `ROADMAP-B-001`.
|
|
107
|
+
|
|
108
|
+
## INV-011 Documentation claims match observed behavior
|
|
109
|
+
- [Verified][C4] docs/comments claim patterns conflict with runtime behavior for write `included` handling.
|
|
110
|
+
- Evidence:
|
|
111
|
+
- [payload-validators.js](/home/merc/Development/current/json-rest-api/plugins/core/lib/querying-writing/payload-validators.js)
|
|
112
|
+
- [common.js](/home/merc/Development/current/json-rest-api/plugins/core/rest-api-plugin-methods/common.js)
|
|
113
|
+
- [docs-drift.md](/home/merc/Development/current/json-rest-api/audit/subsystems/docs-drift.md)
|
|
114
|
+
- Final: `partial`.
|
|
115
|
+
- Remediation pointer: `ROADMAP-B-005`.
|
|
116
|
+
|
|
117
|
+
## INV-012 Tests cover critical invariants beyond happy paths
|
|
118
|
+
- [Verified][C4] suite breadth is high, but critical gaps remain.
|
|
119
|
+
- Gap evidence:
|
|
120
|
+
- skipped cursor tests: [skipped-tests.txt](/home/merc/Development/current/json-rest-api/audit/evidence/tests/skipped-tests.txt)
|
|
121
|
+
- no direct regression for `patchRelationship` failure path before this audit probe.
|
|
122
|
+
- Final: `partial`.
|
|
123
|
+
- Remediation pointer: `ROADMAP-A-003`, `ROADMAP-B-003`.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Standards Rubric (M6, non-anyapi)
|
|
2
|
+
|
|
3
|
+
## Corpus freeze and sources
|
|
4
|
+
- JSON:API spec: `https://jsonapi.org/format/`
|
|
5
|
+
- HTTP Semantics: `https://www.rfc-editor.org/rfc/rfc9110`
|
|
6
|
+
- HTTP PATCH: `https://www.rfc-editor.org/rfc/rfc5789`
|
|
7
|
+
- Source snapshots:
|
|
8
|
+
- [standard-jsonapi-snippets.txt](/home/merc/Development/current/json-rest-api/audit/evidence/external/standard-jsonapi-snippets.txt)
|
|
9
|
+
- [standard-rfc-snippets.txt](/home/merc/Development/current/json-rest-api/audit/evidence/external/standard-rfc-snippets.txt)
|
|
10
|
+
|
|
11
|
+
Scoring scale: `1` poor, `3` mixed, `5` strong.
|
|
12
|
+
|
|
13
|
+
## Criteria IDs
|
|
14
|
+
- `STD-JAPI-01` JSON:API media/document envelope compliance.
|
|
15
|
+
- `STD-JAPI-02` Relationship endpoint semantics and consistency.
|
|
16
|
+
- `STD-HTTP-01` HTTP status code correctness.
|
|
17
|
+
- `STD-HTTP-02` PATCH semantics and failure atomicity handling.
|
|
18
|
+
- `STD-ERR-01` Error envelope quality/consistency.
|
|
19
|
+
- `STD-SEC-01` Secure defaults and trust-boundary explicitness.
|
|
20
|
+
- `STD-EXT-01` Extensibility/configurability hygiene.
|
|
21
|
+
- `STD-OBS-01` Observability/operability diagnostics.
|
|
22
|
+
- `STD-BC-01` Backward compatibility posture.
|
|
23
|
+
- `STD-DOC-01` Documentation reliability.
|
|
24
|
+
|
|
25
|
+
## Gap Matrix
|
|
26
|
+
|
|
27
|
+
| ID | Score | Evidence-backed assessment | Gap class | Severity | Confidence |
|
|
28
|
+
|---|---:|---|---|---|---|
|
|
29
|
+
| STD-JAPI-01 | 3.5 | Core JSON:API document structures and media-type handling are broadly implemented; explicit JSON:API error object support exists in error classes. | design choice | medium | C4 |
|
|
30
|
+
| STD-JAPI-02 | 2.5 | Relationship POST/DELETE endpoint paths pass; PATCH relationship error path is runtime-broken (`ReferenceError`), reducing conformance reliability. | defect | high | C5 |
|
|
31
|
+
| STD-HTTP-01 | 4.0 | Transport maps major codes (400/403/404/415/500) and method-specific 201/204 behavior correctly in most paths. | design choice | low | C4 |
|
|
32
|
+
| STD-HTTP-02 | 2.5 | PATCH baseline works for normal resource updates, but error-path handler defect in relationship PATCH violates robust failure handling expectations. | defect | high | C5 |
|
|
33
|
+
| STD-ERR-01 | 2.0 | Envelope inconsistency observed: CORS blocked-origin returns `{ error: ... }`; relationship PATCH can surface raw `ReferenceError`. | defect | high | C4 |
|
|
34
|
+
| STD-SEC-01 | 3.0 | Access/multitenancy plugins provide meaningful controls, but default CORS option combinations and error leakage behavior require explicit hardening guidance. | design choice | medium | C3 |
|
|
35
|
+
| STD-EXT-01 | 3.5 | Hook/plugin architecture is flexible; bulk optimization hook path appears under-specified in execution wiring. | design choice | medium | C3 |
|
|
36
|
+
| STD-OBS-01 | 3.0 | Logging is rich and structured, but unknown exceptions can surface raw messages; limited audit-style invariant telemetry. | design choice | medium | C3 |
|
|
37
|
+
| STD-BC-01 | 2.5 | No explicit compatibility matrix/deprecation contract found; test failures indicate regression detection exists but policy is implicit. | documentation drift | medium | C3 |
|
|
38
|
+
| STD-DOC-01 | 2.5 | Critical docs/comments drift found (`included` write behavior mismatch) and compliance language overstates edge consistency. | documentation drift | medium | C4 |
|
|
39
|
+
|
|
40
|
+
## Rule-by-rule evidence pointers
|
|
41
|
+
- Runtime and traces:
|
|
42
|
+
- [trace-write-patch.md](/home/merc/Development/current/json-rest-api/audit/traces/trace-write-patch.md)
|
|
43
|
+
- [trace-relationship-endpoints.md](/home/merc/Development/current/json-rest-api/audit/traces/trace-relationship-endpoints.md)
|
|
44
|
+
- [probe-patch-relationship-referenceerror.log](/home/merc/Development/current/json-rest-api/audit/evidence/runtime/probe-patch-relationship-referenceerror.log)
|
|
45
|
+
- Code:
|
|
46
|
+
- [patch-relationship.js](/home/merc/Development/current/json-rest-api/plugins/core/rest-api-plugin-methods/patch-relationship.js)
|
|
47
|
+
- [rest-api-cors-plugin.js](/home/merc/Development/current/json-rest-api/plugins/core/rest-api-cors-plugin.js)
|
|
48
|
+
- [express-plugin.js](/home/merc/Development/current/json-rest-api/plugins/core/connectors/express-plugin.js)
|
|
49
|
+
- [common.js](/home/merc/Development/current/json-rest-api/plugins/core/rest-api-plugin-methods/common.js)
|
|
50
|
+
- Docs drift:
|
|
51
|
+
- [docs-drift.md](/home/merc/Development/current/json-rest-api/audit/subsystems/docs-drift.md)
|
|
52
|
+
|
|
53
|
+
## Standards takeaways
|
|
54
|
+
- Strongest: method ordering discipline (validation/permissions before writes), broad JSON:API-oriented structure support, plugin extensibility.
|
|
55
|
+
- Weakest: failure-path consistency for relationship PATCH and error envelope uniformity.
|
|
56
|
+
- Immediate standards-critical fixes: `STD-JAPI-02`, `STD-HTTP-02`, `STD-ERR-01`.
|