Versions: year.month.release (VERSION) plus build (commit); What's new from CHANGELOG.md

Shown on Admin -> About, in the software history, records package, procedures
and sam:doctor; release notes in the app under Help.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-11 21:03:31 -05:00
1 parent 98e943cf0a
commit 8c8e3b7374
16 files changed
+110 -19

No files matched your search

+38
View File
@@ -0,0 +1,38 @@
# What's new
Each release has a **version** (year.month.release, e.g. 2026.11.0) and a **build** (the exact source commit, shown on Admin → About). The newest release is first.
## 2026.11.0
The first numbered release. Highlights of what Simple Aircraft Manager does as of this version:
### Records and signatures (AC 120-78B)
- Electronic signatures on logbook entries: the signer picks their certificate, re-enters their password (and authenticator code) or signs in again, and certifies a statement. Signed entries are locked; mistakes are fixed with a signed correction.
- Outside mechanics can sign an entry from an emailed, one-time invitation.
- Every change to the maintenance records is kept, hash-chained and checked nightly, including ADs and inspection types applied to or removed from an aircraft (a removed one can be restored).
- Nightly verified database backup, optional off-site copy to Google Drive, and a restore test.
- Recordkeeping procedures document (with suggested text) and periodic records audits.
- Records package for the FAA or a buyer: entries with signatures, history, status report, procedures and the data archive, with a ready-to-run viewer.
### Maintenance tracking
- Airworthiness status from ADs, inspections, squawks, components and documents, with Part 91 rules (annual as 100-hour, overruns, IFR and transponder limits).
- ADs: FAA DRS import with an AD baseline per model, and a weekly search for newly published ADs covering the aircraft, engine, propeller and every installed component.
- Logbook: templates, engine and propeller times, sub-components (a new entry can also record them serviced or replaced), printable entries for the paper logbook, and AI transcription of scanned pages.
- Calendar feed of everything coming due, with dates projected from recent flying for hour-based items.
- Weight and balance with a loading calculator (CG envelope in inches or lb-in/1000).
### Flying
- Flight log grouped by day with the route and totals; long logs load as you scroll.
- Engine monitor data charts, GPS tracks, AirTrail sync, spreadsheet import, and oil and fuel trends.
### Accounts and security
- Single sign-on (OpenID Connect), sign-in links, account lockout, breached-password check and optional authenticator codes.
- Command-line account recovery and maintenance commands (health report, records check, restore).
### Help
- A user guide for every area, in the app under Help.
+4
View File
@@ -13,6 +13,10 @@ The port aims to be **easy to host**. It runs as one process with one SQLite dat
- Authentication uses the Rails 8 built-in generator (sessions plus password reset), emailed sign-in links, and optional OpenID Connect single sign-on (OmniAuth).
- Prawn renders the printable logbook entries; Commonmarker renders Markdown notes and the user guide.
## Versions
Releases are numbered **year.month.release** (`2026.11.0`, `2026.11.1`, … restarting each month) in [`VERSION`](VERSION), and identified exactly by the **build**: the commit they were built from. Both show on Admin → About; [`CHANGELOG.md`](CHANGELOG.md) has the release notes (in the app: Help → What's new). Each release is tagged `v<version>` in git and on Docker Hub.
## User guide
The [user guide](docs/guide/README.md) explains how to use the app, for pilots, owners, mechanics and admins. The same pages are shown in the app under **Help**.
+1
View File
@@ -0,0 +1 @@
2026.11.0
+1
View File
@@ -10,6 +10,7 @@ class AppRevision < ApplicationRecord
record = find_or_initialize_by(revision: revision)
record.first_seen_at ||= now
record.built_at ||= SystemInfo.new.built_at
record.version ||= SystemInfo.new.version
record.last_seen_at = now
record.save!
rescue ActiveRecord::ActiveRecordError => e
+2 -2
View File
@@ -3,7 +3,7 @@
class HelpGuide
DIR = Rails.root.join("docs/guide")
ORDER = %w[README getting-started profile aircraft flights squawks oil-and-fuel components logbook records
inspections ads documents major-records sharing administration].freeze
inspections ads documents major-records sharing administration changelog].freeze
OPTIONS = {
parse: { smart: true },
render: { hardbreaks: false, unsafe: false },
@@ -18,7 +18,7 @@ class HelpGuide
def self.find(slug)
return unless ORDER.include?(slug.to_s)
path = DIR.join("#{slug}.md")
path = slug.to_s == "changelog" ? Rails.root.join("CHANGELOG.md") : DIR.join("#{slug}.md")
return unless path.file?
markdown = path.read
Page.new(slug: slug.to_s, title: markdown[/\A# (.+)$/, 1] || slug.to_s.titleize, markdown: markdown)
+10 -1
View File
@@ -12,7 +12,16 @@ class SystemInfo
DATABASES = { "Main" => :primary, "Cache" => :cache, "Jobs" => :queue, "Cable" => :cable }.freeze
# Set by the Docker build (see Dockerfile); in development, read from git.
# The release version, YYYY.MM.N (the repository's VERSION file).
def version
@version ||= Rails.root.join("VERSION").then { _1.exist? ? _1.read.strip.presence : nil } || "unreleased"
end
# "2026.11.0 (build 87e3094)"
def version_label = "#{version} (build #{revision})"
# The build: the commit it was made from. Set by the Docker build (see
# Dockerfile); in development, read from git.
def revision
@revision ||= ENV["APP_REVISION"].presence ||
(Rails.root.join(".git").exist? && `git -C #{Rails.root} rev-parse --short HEAD 2>/dev/null`.strip.presence) ||
+1 -1
View File
@@ -38,7 +38,7 @@ class RecordsAudit
Item.new("certificates", "No active user is relying on an expired certificate", true, true,
expired.any? ? "Expired (can't sign until renewed): #{expired.map { "#{_1.user.display_name} #{_1.short_label}" }.join(', ')}" : "None expired"),
Item.new("versions", "Software versions since the last audit", true, true,
versions_since.map(&:revision).join(", ").presence || "No changes")
versions_since.map { [ _1.version, "build #{_1.revision}" ].compact.join(" ") }.join(", ").presence || "No changes")
]
end
+2 -2
View File
@@ -51,7 +51,7 @@ class RecordsPackage
check = IntegrityCheck.latest
<<~TXT
Maintenance records for #{@aircraft.tail_number} (#{[ @aircraft.make, @aircraft.model ].compact_blank.join(' ')}, S/N #{@aircraft.serial_number.presence || 'not recorded'})
Prepared #{@generated_at.utc.strftime('%Y-%m-%d %H:%M UTC')} by Simple Aircraft Manager (#{@source}), software version #{SystemInfo.new.revision}.
Prepared #{@generated_at.utc.strftime('%Y-%m-%d %H:%M UTC')} by Simple Aircraft Manager (#{@source}), software version #{SystemInfo.new.version_label}.
Electronic records since: #{@aircraft.electronic_records_since&.iso8601 || 'not stated'}. Earlier records are the paper logbooks#{' (scans marked "legacy record" are in the archive)' if @aircraft.documents.where(legacy_record: true).exists?}.
@@ -106,7 +106,7 @@ class RecordsPackage
# Simple Aircraft Manager on your own computer, to browse #{@aircraft.tail_number.downcase}.sam.zip.
# docker compose up -d then open http://localhost:3000, create an account,
# and import #{@aircraft.tail_number.downcase}.sam.zip (Fleet -> Import). Stop: docker compose down
# Prepared with software version #{SystemInfo.new.revision}.#{" Source: #{repository}" if repository}
# Prepared with software version #{SystemInfo.new.version_label}.#{" Source: #{repository}" if repository}
services:
web:
#{image ? "image: #{image}" : "build: . # no published image known: build from the source code"}
+1 -1
View File
@@ -16,7 +16,7 @@ class SystemDoctor
doctor = new
list = doctor.checks
lines = list.map { |c| "#{{ ok: ' ok ', warn: ' WARN', fail: ' FAIL' }[c.status]} #{c.name.ljust(22)} #{c.detail}" }
[ "Simple Aircraft Manager #{SystemInfo.new.revision} (#{Rails.env})", *lines ].join("\n").then { [ _1, list ] }
[ "Simple Aircraft Manager #{SystemInfo.new.version_label} (#{Rails.env})", *lines ].join("\n").then { [ _1, list ] }
end
private
+5 -5
View File
@@ -8,10 +8,10 @@
<div class="flex flex-wrap items-end justify-between gap-4">
<div>
<p class="text-xs uppercase tracking-wide text-slate-500">Version</p>
<p class="font-mono text-2xl font-semibold" data-revision>
<%= info.revision_url ? link_to(info.revision, info.revision_url, class: "link", target: "_blank", rel: "noopener", title: "This commit on GitHub") : info.revision %>
</p>
<% if info.repository_url %><p class="mt-1 text-sm"><%= link_to "Source code", info.repository_url, class: "link", target: "_blank", rel: "noopener" %></p><% end %>
<p class="font-mono text-2xl font-semibold" data-version><%= info.version %></p>
<p class="text-sm text-slate-600" data-revision>Build
<%= info.revision_url ? link_to(info.revision, info.revision_url, class: "link font-mono", target: "_blank", rel: "noopener", title: "This commit on GitHub") : tag.span(info.revision, class: "font-mono") %></p>
<p class="mt-1 flex flex-wrap gap-x-3 text-sm"><%= link_to "What's new", help_page_path("changelog"), class: "link" %><% if info.repository_url %><%= link_to "Source code", info.repository_url, class: "link", target: "_blank", rel: "noopener" %><% end %></p>
</div>
<dl class="grid grid-cols-2 gap-x-6 gap-y-1 text-sm sm:grid-cols-3">
<div><dt class="text-slate-500">Built</dt><dd class="font-medium"><%= info.built_at ? l(info.built_at.in_time_zone, format: :short) : "—" %></dd></div>
@@ -108,7 +108,7 @@
<div class="card-header"><h2 class="card-title">Software versions</h2></div>
<% revisions = AppRevision.latest_first.limit(20) %>
<% if revisions.any? %>
<%= render "pairs", pairs: revisions.map { |r| [ r.revision, "#{l(r.first_seen_at, format: :short)} – #{l(r.last_seen_at, format: :short)}" ] } %>
<%= render "pairs", pairs: revisions.map { |r| [ [ r.version, "build #{r.revision}" ].compact.join(" · "), "#{l(r.first_seen_at, format: :short)} – #{l(r.last_seen_at, format: :short)}" ] } %>
<% else %>
<%= empty_state "No versions recorded yet." %>
<% end %>
@@ -31,7 +31,7 @@
<h2 class="<%= h2 %>">3. System description</h2>
<ul class="<%= p_ %> list-disc pl-5">
<li><strong>Software:</strong> Simple Aircraft Manager, version <%= info.revision %> (Ruby <%= RUBY_VERSION %>, Rails <%= Rails.version %>, SQLite <%= SQLite3::SQLITE_VERSION %>).</li>
<li><strong>Software:</strong> Simple Aircraft Manager, version <%= info.version_label %> (Ruby <%= RUBY_VERSION %>, Rails <%= Rails.version %>, SQLite <%= SQLite3::SQLITE_VERSION %>).</li>
<li><strong>Hosting and network:</strong>
<% if policy.hosting_description.present? %><div class="mt-1"><%= markdown(policy.hosting_description) %></div><% else %>[describe the server, location and network]<% end %>
<p class="mt-1"><%= ProceduresTemplates.https? ? "Connections use HTTPS only: the system redirects plain HTTP and marks its cookies secure." : "The system is set not to enforce HTTPS itself (FORCE_SSL=false); how connections are protected is described above." %> <%= ProceduresTemplates.sign_in_sentence %></p></li>
@@ -78,7 +78,7 @@
<li><strong>Confidential information (3.2.3):</strong> records are visible only to the aircraft's users, and to share links an owner creates (scoped and optionally expiring).</li>
<li><strong>Data corruption (3.2.4):</strong> nightly, the history chains and every signature's seal and fingerprint are checked; administrators are emailed on any problem.</li>
<li><strong>Outages (3.2.5):</strong> entries are made on paper and signed in ink during an outage (section 13); the database is restored from the latest verified copy or the off-site backup.</li>
<li><strong>Software revision control (3.2.6):</strong> the software is updated by deploying a new version built from its source repository; each version and when it ran is recorded by the system. Before an update that changes how records are entered, displayed or accessed, the responsible person reviews it, and these procedures are revised if they're affected.</li>
<li><strong>Software revision control (3.2.6):</strong> the software is updated by deploying a new release built from its source repository. Each release has a version (year.month.release, e.g. 2026.11.0) and a build (the exact source commit), with release notes describing what changed (What's new); each version and when it ran is recorded by the system. Before an update that changes how records are entered, displayed or accessed, the responsible person reviews it, and these procedures are revised if they're affected.</li>
<li><strong>Backups (3.2.7):</strong> see section 3.</li>
</ul>
+3 -3
View File
@@ -37,13 +37,13 @@
{
"warning_type": "Cross-Site Scripting",
"warning_code": 4,
"fingerprint": "85f8003e1ad00eeb2308faea3dd89e55db1b7a794b9c1a8b05c16466849038ac",
"fingerprint": "8a1a5b9527b7a486b508cfeedb365ccb784d3a0736e794ef2b9a81d95a2b669c",
"check_name": "LinkToHref",
"message": "Potentially unsafe model attribute in `link_to` href",
"file": "app/views/admin/about/show.html.erb",
"line": 12,
"line": 13,
"link": "https://brakemanscanner.org/docs/warning_types/link_to_href",
"code": "link_to(SystemInfo.new.revision, SystemInfo.new.revision_url, :class => \"link\", :target => \"_blank\", :rel => \"noopener\", :title => \"This commit on GitHub\")",
"code": "link_to(SystemInfo.new.revision, SystemInfo.new.revision_url, :class => \"link font-mono\", :target => \"_blank\", :rel => \"noopener\", :title => \"This commit on GitHub\")",
"render_path": [
{
"type": "controller",
@@ -0,0 +1,6 @@
class AddVersionToAppRevisions < ActiveRecord::Migration[8.1]
def change
# The release version (YYYY.MM.N) that build was, next to its commit.
add_column :app_revisions, :version, :string
end
end
Generated
+2 -1
View File
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.1].define(version: 2026_11_11_020000) do
ActiveRecord::Schema[8.1].define(version: 2026_11_11_030000) do
create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
t.string "record_type", null: false
@@ -293,6 +293,7 @@ ActiveRecord::Schema[8.1].define(version: 2026_11_11_020000) do
t.datetime "built_at"
t.datetime "first_seen_at", null: false
t.datetime "last_seen_at", null: false
t.string "version"
t.index ["revision"], name: "index_app_revisions_on_revision", unique: true
end
+1 -1
View File
@@ -46,7 +46,7 @@ If single sign-on is broken and `PASSWORD_LOGIN=false` is set, remove that setti
## About
**About** shows the running version, features and storage, and has tools:
**About** shows the running version (year.month.release, e.g. 2026.11.0) and build (the exact source commit), with a link to **What's new** (the release notes, also under Help), and the features and storage. It has tools:
- **Send test email** and **Send me this week's reminder** check that email works.
- **Records integrity**: the last nightly backup, off-site copy and records check. **Back up and check now** runs the backup and check straight away.
+31
View File
@@ -0,0 +1,31 @@
require "test_helper"
# Releases: version (YYYY.MM.N, from VERSION) plus build (the commit), and
# release notes (CHANGELOG.md) as "What's new".
class VersioningTest < ActionDispatch::IntegrationTest
test "the version comes from VERSION; About shows version, build and What's new" do
version = File.read(Rails.root.join("VERSION")).strip
assert_match(/\A\d{4}\.\d{1,2}\.\d+\z/, version)
info = SystemInfo.new
assert_equal version, info.version
assert_equal "#{version} (build #{info.revision})", info.version_label
sign_in create_user("admin@example.com", admin: true)
get admin_about_path
assert_select "[data-version]", text: version
assert_select "[data-revision]", text: /Build/
assert_select "a[href='#{help_page_path('changelog')}']", text: "What's new"
get help_page_path("changelog")
assert_response :success
assert_select "h1", text: /What.s new/
assert_select "h2", text: version # the current version has release notes
end
test "each recorded software build remembers its version" do
AppRevision.touch_current!
revision = AppRevision.find_by(revision: SystemInfo.new.revision)
skip "no git revision in this environment" unless revision
assert_equal SystemInfo.new.version, revision.version
end
end