mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
Records integrity: history, nightly backup and check, records package
AC 120-78B chapter 3:
- Every change to logbook entries, sub-components, signatures, inspection
records, AD compliance, major records, W&B, components, squawks and
documents is kept as a RecordVersion (who, IP, when, field changes),
hash-chained per aircraft; versions can't be edited or deleted. Shown on
each logbook entry and in Activity -> Record history
- Nightly job: SQLite online-backup copy to storage/backups, verified
(integrity_check + record counts), pruned to the configured number; then
an integrity check of the history chains and every signature's seal and
fingerprint. Results on Admin -> About ("Back up and check now"); admins
are emailed on failure
- Software versions recorded (first/last seen) on Admin -> About
- Records package (Access & Sharing): logbook entries PDF with signatures,
signatures.csv, record-history.csv, self-contained status report HTML,
the .sam.zip, and a README, for the FAA/NTSB or a buyer
- Legacy (paper) records: documents can be marked as legacy records;
aircraft have an "electronic records since" date (status report, package)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d719f663bc
commit
68a1719db2
53 files changed
+750
-12
No files matched your search
@@ -143,6 +143,7 @@ module AircraftArchive
|
||||
make: a["make"].to_s, model: a["model"].to_s, serial_number: a["serial_number"].to_s, description: a["description"].to_s,
|
||||
purchased: date(a["purchased"]), status: Aircraft::STATUSES.key?(a["status"]) ? a["status"] : "AVAILABLE",
|
||||
time_basis: Aircraft::TIME_BASES.key?(a["time_basis"]) ? a["time_basis"] : "tach",
|
||||
electronic_records_since: date(a["electronic_records_since"]),
|
||||
loading_stations: a["loading_stations"].is_a?(Hash) ? a["loading_stations"] : nil,
|
||||
cg_envelope: a["cg_envelope"].is_a?(Array) ? a["cg_envelope"] : nil, ad_watch_terms: a["ad_watch_terms"].to_s.first(500).presence,
|
||||
tach_time: num(a["tach_time"] || a["flight_time"]) || 0, tach_time_offset: num(a["tach_time_offset"]) || 0,
|
||||
@@ -207,7 +208,7 @@ module AircraftArchive
|
||||
d = @aircraft.documents.new(name: data["name"].to_s.presence || "Untitled", description: data["description"].to_s,
|
||||
doc_type: data["doc_type"].presence, visibility: visibility(data["visibility"]),
|
||||
document_collection_id: @map[:collection][data["collection_id"].to_s],
|
||||
expires_on: date(data["expires_on"]))
|
||||
expires_on: date(data["expires_on"]), legacy_record: data["legacy_record"] == true)
|
||||
d.doc_type = "OTHER" unless Document::TYPES.key?(d.doc_type)
|
||||
d.save!(validate: false)
|
||||
@map[:document][data["id"].to_s] = d.id
|
||||
|
||||
Reference in new issue
Block a user