Skip to content

Feature: adsbexchange-stats: add new package - #29424

Open
billmcilhargey wants to merge 5 commits into
openwrt:masterfrom
billmcilhargey:add-adsbexchange-stats
Open

billmcilhargey wants to merge 5 commits into
openwrt:masterfrom
billmcilhargey:add-adsbexchange-stats

Conversation

@billmcilhargey

@billmcilhargey billmcilhargey commented May 11, 2026 •

Copy link
Copy Markdown

⚠️ Depends on #29411 (readsb-wiedehopf: new package).
Filed as a Draft until #29411 merges. CI failures on this PR until then are
expected — +readsb-wiedehopf is unresolved in the feed without it.

ADSBexchange.com statistics uploader for OpenWrt.

Periodically reads aircraft.json from readsb (via readsb-wiedehopf),
aggregates per-aircraft RSSI and counts, and POSTs the result to
https://adsbexchange.com identified by the station UUID stored at
readsb.main.uuid -- shared with readsb's BEAST connectors so a single
readsb-uuid configures both.

📦 Package Details

Maintainer: @billmcilhargey

Description:
New leaf package utils/adsbexchange-stats. Procd-supervised bash
uploader that talks to ADSBexchange.com's per-station ranking endpoint.
Pure shell payload, no compile step. Configuration is UCI-only
(/etc/config/adsbexchange-stats); the station UUID is shared with
readsb-wiedehopf via readsb.main.uuid so a single identity is used
by the BEAST feed connector and this uploader. Logging goes to syslog
under the adsbexchange-stats tag at user-selectable verbosity.

Files added:

Path Purpose
utils/adsbexchange-stats/Makefile Package metadata, install rules, postinst/prerm/postrm
utils/adsbexchange-stats/files/adsbexchange-stats.config UCI defaults (declarative-only, see README)
utils/adsbexchange-stats/files/adsbexchange-stats.init procd init script (extra actions: showurl, about, activate)
utils/adsbexchange-stats/files/adsbexchange-stats.functions.sh Shared sh helpers (UUID, JSON path resolution, logging)
utils/adsbexchange-stats/files/adsbexchange-stats.json-status-helpers.sh curl wrapper + per-cycle/summary metrics
utils/adsbexchange-stats/patches/010-openwrt-paths.patch Five minimal hooks on upstream json-status (paths, env file, scratch dir, perl-version gate, metrics)
utils/adsbexchange-stats/README.md Full operator documentation

Upstream: https://github.com/ADSBexchange/adsbexchange-stats pinned at
commit 11647f27de3eef51fb19bcb39f0dc0b8500a6671. Upstream license
preserved as MIT; OpenWrt packaging files are GPL-2.0-only.

Dependency chain

This PR consumes three artifacts shipped by #29411:

  • readsb.main.uuid — shared station identity
  • readsb-uuid CLI — manages the UUID for both packages
  • /usr/lib/readsb/functions.sh — provides readsb_is_uuid (8-4-4-4-12 hex validator)

DEPENDS:=+bash +jq +curl +coreutils-stat +readsb-wiedehopf


🧪 Run Testing Details

  • OpenWrt Version: OpenWrt 23.05-SNAPSHOT (LuCI openwrt-23.05 branch git-25.163.46318-26086b5, kernel 5.4.164)
  • OpenWrt Target/Subtarget: ipq60xx/generic
  • OpenWrt Device: GL.iNet GL-AXT1800 (Slate AX) — Qualcomm IPQ6018, ARMv8 rev 4

Build verification (snapshot SDK, aarch64_cortex-a53):

./scripts/feeds update -a
./scripts/feeds install -a -p packages
make package/adsbexchange-stats/{clean,download,prepare,compile} V=s

Runtime verification on the GL-AXT1800:

opkg install adsbexchange-stats_*.ipk
readsb-uuid                                  # set the shared station UUID
service adsbexchange-stats enable
service adsbexchange-stats start
service adsbexchange-stats showurl           # public per-station stats URL
logread -e adsbexchange-stats                # confirm uploads at log_level=1

Tested behavior:

  • postinst auto-start path: with readsb.main.uuid already set → service starts; without UUID → banner printed, service stays stopped (verified both).
  • Service interface: service adsbexchange-stats {start|stop|restart|reload|status|enable|disable}. Extra actions: showurl, about, and activate <feeder>.
  • Reload trigger fires correctly on uci commit adsbexchange-stats and on uci commit readsb (UUID / write_json changes propagate without manual restart).
  • log_level 0 / 1 / 2 / 3 — error-only / +summary / +per-cycle / +curl-v all observed in logread.
  • dns_cache=0 (default) and dns_cache=1 with a non-loopback resolver — both function; 127.0.0.0/8 resolver auto-disables the cache as documented.
  • json_paths_override empty (derived from readsb.main.write_json=/var/run/readsb) and explicit override both resolve correctly; unsafe-token rejection logs at warn.
  • prerm / postrm clean removal: /var/run/adsbexchange-stats cleared, /etc/config/adsbexchange-stats preserved (conffile), readsb.main.uuid untouched.
  • Uptime at submission: 1d 0h 29m 55s, load 0.19/0.21/0.27 — uploader stable across the window with no procd respawns.

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/adsbexchange-stats/refresh V=s
  • It is structured in a way that it is potentially upstreamable
    (the patch only adds OpenWrt-specific defaults and an opt-in
    $ADSBX_ENV_FILE source hook; both are no-ops when the env file is
    unset, so the change is upstream-friendly).

@BKPepe
BKPepe force-pushed the add-adsbexchange-stats branch from 636fcfa to 983abb9 Compare May 13, 2026 11:40
@billmcilhargey
billmcilhargey marked this pull request as ready for review May 16, 2026 11:43
@billmcilhargey

Copy link
Copy Markdown
Author

Marked as ready for review, I was waiting for the main one to be reviewed and approved first as I was not sure the process but in case this one was holding the main one up, I marked this as ready for review too

Appreciate it again!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@billmcilhargey

billmcilhargey commented Jun 11, 2026 •

Copy link
Copy Markdown
Author

Feel free to add label "Depends on PR in other repo" as this package depends upon approval of PR -> #29411 or basically package -> readsb-wiedehopf

the package here, adsbexchange-stats is an optional package that is referenced by the package readsb-wiedehopf which is currently in the final review stages for getting approved.

This package adsbexchange-stats is ready for review and all set unless any reviewers have any concerns.

Also since copilot ran into an overall error on this, although the session itself looked good, I re-requested a review by copilot since it appeared to let me, just in case a reviewer had any concerns with copilot running into an error earlier.

Thank you again!

@billmcilhargey
billmcilhargey requested a review from Copilot June 11, 2026 14:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Comment thread utils/adsbexchange-stats/patches/010-openwrt-paths.patch Outdated
Comment thread utils/adsbexchange-stats/patches/010-openwrt-paths.patch Outdated
Comment thread utils/adsbexchange-stats/patches/010-openwrt-paths.patch Outdated
Comment thread utils/adsbexchange-stats/files/adsbexchange-stats.init Outdated
Comment thread utils/adsbexchange-stats/files/adsbexchange-stats.json-status-helpers.sh Outdated
@billmcilhargey
billmcilhargey force-pushed the add-adsbexchange-stats branch 2 times, most recently from 4ff524b to b13b2a5 Compare June 18, 2026 22:24
@billmcilhargey

Copy link
Copy Markdown
Author

Resolved GitHub Copilot review requests and all ready for any final reviews and approvals! Thank you again

@billmcilhargey

Copy link
Copy Markdown
Author

Working on other PR change requests and just wanted to ensure this stayed active

Finally catching up here and let me review the work here requested and work to implement! Thank you!

@billmcilhargey

Copy link
Copy Markdown
Author

Signed commit with key

@billmcilhargey
billmcilhargey force-pushed the add-adsbexchange-stats branch from 789198c to c65a8f5 Compare August 11, 2026 15:01
@billmcilhargey
billmcilhargey force-pushed the add-adsbexchange-stats branch 2 times, most recently from 9d38cf7 to e75ab51 Compare August 11, 2026 15:06
@billmcilhargey

Copy link
Copy Markdown
Author

Now successfully verified and signed and following repros guidelines and ready for review and the dependency package is being reviewed now too

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit (e75ab51, fresh review — no prior automated review at this head).

Two findings look merge-blocking to me, both reproducible without hardware:

  • patches/010-openwrt-paths.patch is not a parseable unified diff — patch aborts with malformed patch at line 110, so the package cannot build. Hunk headers 4 and 5 disagree with their bodies, and the removed-side perl line is wrapped mid-token.
  • _clamp() in the init script never matches, because | coming out of a variable is not case alternation. dns_cache, dns_ignore_local and log_level are all silently pinned to their defaults regardless of UCI.

The info action is a third real (if harmless) defect: procd's rc.common overrides it, so the banner and the Makefile's @PKG_*@ substitutions are unreachable.

The remaining two comments are marked nit: and are not blockers. Everything else — procd usage, conffiles, PKG_MAINTAINER, scriptlet guards, PKG_RELEASE — reads fine, and the shell in functions.sh / json-status-helpers.sh is carefully written. Note that CI here only ran the three FormalityCheck jobs (all green); there was no build job, which is why the patch breakage went unnoticed.

I did not review against upstream ADSBexchange/adsbexchange-stats — that repo is outside this session's access, so the patch's content against the pinned commit 11647f27 is unverified; only its diff structure is.


Generated by Claude Code

Comment thread utils/adsbexchange-stats/patches/010-openwrt-paths.patch Outdated
Comment thread utils/adsbexchange-stats/files/adsbexchange-stats.init
Comment thread utils/adsbexchange-stats/files/adsbexchange-stats.init Outdated
Comment thread utils/adsbexchange-stats/files/adsbexchange-stats.config Outdated
Comment thread utils/adsbexchange-stats/Makefile Outdated
Copilot AI balanced review requested due to automatic review settings October 4, 2026 18:24
@billmcilhargey

billmcilhargey commented Oct 4, 2026 •

Copy link
Copy Markdown
Author

Companion integration update: explicit opt-in and selected feeder identity

Companion history/CI blocker cleared: this PR is now one verified signed commit, a29508f7c, with all three formality checks passing. The requested squash and subsequent review fixes are complete. See the final resolution and validation notes. Earlier pending-history statements below are historical and superseded.

Published 138780946 — adsbexchange-stats: require opt-in and follow feeder identity and 7bc1b3898 — restore embedded patch metadata, coordinated with a05026d2c in openwrt/packages#29411. The uploader remains a separate optional package; ordinary feeding does not require it.

Summary update

  • Published optional uploader integration, coordinated with openwrt/packages#29411. The current uploader head is verified signed commit 7bc1b3898, following implementation commit 138780946.
  • Uploads are disabled by default and require separate consent. Activation selects an enabled ADSBx feeder, uses its UUID override before the station fallback, and rechecks consent, feeder selection, and identity before upload requests.
  • All five addressed review items are fixed; 10/10 companion conversations are resolved. This includes the regenerated patch, option allow-list handling, reachable about action, documentation location, and menu placement.
  • 1,011 combined shell regression executions and 42 real-UCI checks passed. The current upstream patch applies without fuzz.
  • CI is not fully green: Git & Commits and OpenWrt Makefiles pass, while Code Patches still flags the intermediate 138780946 patch headers. The current patch is corrected, but the checker examines history. Approval is still needed to squash/rewrite only the two new companion commits with an exact lease; no history rewrite has been performed.
  • Full SDK/router/physical-SDR/live-upload validation was not performed. Detailed implementation evidence and limitations are retained below.

Final behavior of this update

  • Uploads default to disabled. Installation alone is not upload consent. OpenWrt's generic package hooks may register/call the init script, but the UCI permission gate prevents an uploader process from starting.
  • activate <feeder> is an explicit consent action. It requires an existing enabled ADSBexchange feeder, checks pending edits, saves that feeder association, enables upload permission and the boot service, and restarts the uploader. The decoder presents it through a separate default-No prompt after feeder creation, or readsb-feeder --setup-companions <name> for existing feeders.
  • Identity follows the selected feeder: use its nonempty UUID override first, then readsb.main.uuid. Missing, disabled, wrong-provider, or malformed-identity selections are rejected. No automatic selection among multiple feeders.
  • Every upload rechecks the uploader's consent flag, selected feeder, and current UUID. Changed selection/identity requires reload before more requests; disabling/removing the feeder blocks uploads. Readsb/UCI reload triggers restart the uploader to regenerate its environment.
  • Upgrade handling preserves disabled boot-service state, including the generic framework start path. Older configurations without an explicit feeder association require selection before uploads; the package does not guess a migration target.
  • Invalid environment/UUID-file preparation stops startup. Activation failures are reported explicitly.

Existing review fixes included

  • Regenerated the malformed patch from the exact pinned upstream source rather than editing hunk counts manually. git apply --check, zero-fuzz patch application, and Bash syntax validation pass. Required mail-style headers are present in the current patch.
  • Fixed allow-list handling so non-default log levels and DNS toggles are preserved.
  • Renamed the package banner to about, leaving procd's built-in info untouched; updated action registration, README, and decoder discovery.
  • Replaced the nonexistent installed-README reference with the source-repository URL and package about action.
  • Removed the unmatched Radio Devices submenu to keep this companion alongside the decoder under Utilities.
  • Included the existing packaging-file GPL-2.0-only license in metadata without relicensing upstream.

Implementation/validation replies were added to the five addressed review threads. The current default-off and feeder-associated behavior supersedes the original PR description's auto-start and main-UUID-only statements.

Verification

The uploader suite has 41 passing cases under each of dash, Bash, and BusyBox ash, including consent/identity guards, explicit activation, generated environment, option values, install/upgrade framework behavior, reload, and end-to-end calls from the decoder setup helper.

Together with decoder suites, 1,011 shell regression executions passed; 42 real-UCI integration checks also passed, including companion-package updates not committing pending decoder edits. Companion scripts/new tests are ShellCheck-clean, decoder changes add no new baseline findings, and changed scripts pass syntax checks under all three shells. The patch applies without fuzz to upstream 11647f27de3eef51fb19bcb39f0dc0b8500a6671.

No full OpenWrt SDK package build, router install/upgrade test, physical SDR test, or live statistics upload was performed. These are local mocked/native checks, not renewed hardware certification.

Remaining CI blocker

The current patch passes the required Git-header validation, but Code Patches checks every commit and still flags the intermediate 138780946 version that lacked mail headers. 7bc1b3898 restores them without changing the validated hunks. Git & Commits and OpenWrt Makefiles pass. Clearing the historical Code Patches failure requires approval to squash/rewrite only these two new companion commits with an exact lease; history has not been rewritten without approval. This CI gate remains unresolved even though the current source and patch are corrected.

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit checks

  • 7bc1b38 "adsbexchange-stats: restore embedded patch metadata": this only puts back the patch headers that 1387809 dropped. For a new package, squash both follow-ups into e75ab51 so the series is one "add new package" commit.

Generated by Claude Code

Comment thread utils/adsbexchange-stats/files/adsbexchange-stats.json-status-helpers.sh Outdated
Comment thread utils/adsbexchange-stats/files/adsbexchange-stats.json-status-helpers.sh Outdated
@billmcilhargey

billmcilhargey commented Oct 4, 2026 •

Copy link
Copy Markdown
Author

Companion-only review follow-up

Companion history/CI blocker cleared: the approved squash and all subsequent review fixes are published as a29508f7c, the sole verified signed package-addition commit in this PR. All three formality checks now pass. See the final resolution notes; the remaining-blocker section below records the earlier state.

Published 2b4a37201 — adsbexchange-stats: align boolean guards and main section startup on add-adsbexchange-stats. GitHub verifies its GPG signature. The decoder branch was not changed.

Code recommendations addressed

  • Boolean consistency: both the feeder-enabled and uploader-enabled guards now accept OpenWrt's enabled spelling alongside 1, on, true, and yes. False and unrecognized values still block uploads. Startup and request-time consent now agree.
  • One supported uploader section: service startup validates and starts only the named main section, matching the existing activation, configuration, environment, and request guards. Extra sections cannot create another uploader, replace the selected identity, or bypass disabled main consent. Missing or incorrectly typed main configuration produces an explicit error. README documents the contract.

Six failing cases were reproduced before these changes. The expanded companion suite now passes 69 cases under each of dash, Bash, and BusyBox ash: 207 passing executions, including the existing decoder-to-uploader activation checks. Source/test ShellCheck, cross-shell syntax, and whitespace checks pass. No live upload, router install, or full SDK build was performed for this follow-up.

Implementation replies have been posted to the two new review threads. Their code fixes are complete and the conversations are being marked resolved.

Remaining history/CI recommendation

The reviewer also requests one clean “add new package” commit. That is still needed: Code Patches scans every PR commit and continues to reject the intermediate 138780946 version that lacked mail headers, although the current patch has those headers and applies cleanly. Git & Commits and OpenWrt Makefiles pass on the current head.

The appropriate history cleanup is to squash the original package commit and its three follow-ups into one signed addition, then publish with an exact force-with-lease on this branch only. Explicit permission for that rewrite was requested but was not available, so the tested code changes were published as a normal follow-up instead. I have not modified checks or rewritten history to hide the failure. The CI/history blocker remains open pending that authorization.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread utils/adsbexchange-stats/files/adsbexchange-stats.init
Comment thread utils/adsbexchange-stats/files/adsbexchange-stats.init Outdated
Comment thread utils/adsbexchange-stats/files/adsbexchange-stats.init Outdated
Comment thread utils/adsbexchange-stats/files/adsbexchange-stats.init
Comment thread utils/adsbexchange-stats/patches/010-openwrt-paths.patch Outdated
Clamp startup log settings consistently with the uploader environment
so notices report effective verbosity and summary intervals rather
than raw invalid UCI input. Document the activate action using the
service command form, bump the release, and cover effective settings
with focused regression tests.

Signed-off-by: Dr Bill Mcilhargey <contributor@mcilhargey.com>
Copilot AI balanced review requested due to automatic review settings October 5, 2026 05:46
@billmcilhargey

Copy link
Copy Markdown
Author

Addressed both outstanding review recommendations in signed, signed-off commit 9e58191 on add-adsbexchange-stats. Ready for another review.

  • Package help now documents service adsbexchange-stats activate <feeder> and uses the service-command form for the other extra actions.
  • Startup notices normalize verbosity and summary intervals with the same rules used for the generated uploader environment, so logs reflect effective settings rather than invalid raw UCI values.
  • Added regression checks for invalid settings, valid settings, and leading-zero summary intervals; bumped the package release to 2.

Validation: all 101 stats checks passed, including the integrated companion-consent flow against the updated readsb package. Shell syntax checks passed; ShellCheck introduced no new findings versus the pre-change baseline. No full OpenWrt SDK build or device test was performed.

Both previously open review threads have been resolved. Thank you for the review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review effort: Lite
Findings: 2 Medium severity · 1 Low severity

Open (3)
Resolved since last review (2)

Comment thread utils/adsbexchange-stats/Makefile Outdated
Comment thread utils/adsbexchange-stats/files/adsbexchange-stats.functions.sh Outdated
Comment thread utils/adsbexchange-stats/Makefile Outdated
Print errors explicitly on stderr as well as sending them to syslog.
Keep showurl in the extra-actions section instead of daemon control,
and start the newly introduced package at release 1.

Add focused tests for production logger output and package help.

Signed-off-by: Dr Bill Mcilhargey <contributor@mcilhargey.com>
Copilot AI balanced review requested due to automatic review settings October 5, 2026 07:20
@billmcilhargey

Copy link
Copy Markdown
Author

Additional recommendations addressed in signed, signed-off commit e3d462d on add-adsbexchange-stats. Ready for another review.

  • adsbx_err now explicitly prints the error to stderr and also sends it to syslog; it no longer relies on redirecting logger stdout.
  • Initial PKG_RELEASE is 1 because this package has not yet been introduced in-tree.
  • showurl remains documented as an extra service action and is no longer mixed into the standard daemon-control list.

Validation: all 105 stats regression checks passed under Linux sh, including the production logger stderr/syslog test and package-help assertions. Shell syntax checks passed, with no new ShellCheck findings versus the previous commit. SDK/device validation was not performed. All three new review conversations are resolved.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review effort: Lite
Findings: 1 Low severity

Open (1)
Resolved since last review (3)

Comment thread utils/adsbexchange-stats/files/adsbexchange-stats.init
Copilot AI balanced review requested due to automatic review settings October 5, 2026 07:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review effort: Lite
Findings: 1 Medium severity · 2 Low severity

Open (3)

Comment thread utils/adsbexchange-stats/files/adsbexchange-stats.init
Enforce mode 0600 before writing UUID content, including when a
runtime file already exists. Abort startup if permissions cannot be
secured. Normalize log levels at upload-helper entry points before
numeric comparisons, with a quiet fallback for invalid overrides.

Cover pre-existing UUID permissions, failed chmod, and valid/invalid
manual log-level overrides with focused regression tests.

Signed-off-by: Dr Bill Mcilhargey <contributor@mcilhargey.com>
Copilot AI balanced review requested due to automatic review settings October 5, 2026 08:35
@billmcilhargey

Copy link
Copy Markdown
Author

Addressed the latest recommendations in signed, signed-off commit f61dfa1. UUID files are restricted to mode 0600 before writing, including pre-existing files; failed permission changes prevent startup. Upload helpers normalize log-level overrides before numeric comparisons, preserving valid levels and safely handling invalid values. Also corrected the PR description to document showurl, about, and activate rather than info. Validation: all 117 stats checks passed under Linux sh, syntax checks pass, and ShellCheck has no new findings. SDK/device testing was not performed. All three new review threads are resolved. Ready for another review.

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit checks


Generated by Claude Code

Comment thread utils/adsbexchange-stats/tests/stats.sh Outdated
Comment thread utils/adsbexchange-stats/Makefile Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread utils/adsbexchange-stats/files/adsbexchange-stats.functions.sh Outdated
Copilot AI balanced review requested due to automatic review settings October 5, 2026 08:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread utils/adsbexchange-stats/Makefile
Comment thread utils/adsbexchange-stats/files/adsbexchange-stats.functions.sh Outdated
Redact station UUIDs, authorization headers, and cookies from curl
diagnostics on success and failure. Omit UUIDs from startup notices.
Preserve configured runtime paths and disable duplicate daemon stderr
logging while retaining useful error output for manual callers.

Remove brittle metadata assertions, align package help, and document
runtime overrides and logging privacy. Add focused behavior tests.
Retain the repository convention for space-separated license IDs.

Signed-off-by: Dr Bill Mcilhargey <contributor@mcilhargey.com>
Copilot AI balanced review requested due to automatic review settings October 5, 2026 11:02
@billmcilhargey

Copy link
Copy Markdown
Author

Published signed, signed-off commit 0ab2b8e. Curl diagnostics redact station UUIDs and sensitive authorization/cookie headers on success and failure; startup notices omit the UUID. Runtime path overrides are preserved, and procd disables duplicate stderr error logging while manual callers retain it. Removed brittle metadata/help assertions, aligned package help, and documented privacy and override behavior. Retained the repository convention for whitespace-separated license identifiers with an explanation in the thread. All 121 stats checks passed under Linux sh, including redaction and logging modes, with no new ShellCheck findings. SDK/device testing was not performed. All nine reviewed threads are resolved. Ready for another review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +143 to +149
if [ "$errfile" != /dev/null ] && [ -s "$errfile" ]; then
if [ "$rv" -ne 0 ]; then
logger -t "$ADSBX_LOG_TAG" -p daemon.warn < "$errfile"
elif [ "$ADSBX_LOG_LEVEL" -ge 3 ]; then
logger -t "$ADSBX_LOG_TAG" -p daemon.debug < "$errfile"
fi
fi
Comment on lines +60 to +83
uuid=$(printf '%s\n' "$snapshot" | awk -v feeder="$feeder" '
function enabled(value) { return value ~ /^(1|on|true|yes|enabled)$/ }
{
separator = index($0, "=")
if (!separator) next
key = substr($0, 1, separator - 1)
value = substr($0, separator + 1)
if (value ~ /^\047.*\047$/) value = substr(value, 2, length(value) - 2)
settings[key] = value
}
END {
uploader = "adsbexchange-stats.main"
selected = "readsb." feeder
if (settings[uploader] != "adsbexchange-stats" ||
!enabled(settings[uploader ".enabled"])) exit 1
if (settings[uploader ".feeder"] != feeder) exit 2
if (settings[selected] != "feeder" ||
settings[selected ".preset"] != "adsbexchange" ||
!enabled(settings[selected ".enabled"])) exit 3
uuid = settings[selected ".uuid"]
if (uuid == "") uuid = settings["readsb.main.uuid"]
print uuid
}
')
Copilot AI balanced review requested due to automatic review settings October 5, 2026 11:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review effort: Lite
Findings: 2 Medium severity · 1 Low severity

Open (3)

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=b16c3c708daea4389f1d850aca1c899cfd9827785038c332c4bf28e541ae5992

PKG_LICENSE:=MIT GPL-2.0-only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants