Repository navigation
Add protocol + NFC host unit tests (new CI gates) and wire up the NFC host bound - #6
Merged
Merged
Conversation
Hosts come off the tag, so the bound limits what is shown as much as it sizes a buffer. Defines the constant only; nothing references it yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
The failing check is
So this is the known, pre-existing, base-branch-red advisory condition, not a regression from this change. No fix is applied (the repo explicitly forbids Generated by Claude Code |
Hoggormino
marked this pull request as ready for review
September 24, 2026 11:48
Adds two off-device host test suites following the existing OEPL pattern (real module source compiled against tiny stubs, run in CI, no Flipper SDK): - proto: the pure geometry/layout helpers in protocol/tagtinker_proto.h — the Color 2.6 wire<->glass coordinate transform, page resolution, the width/height swap, and profile glass sizing. - nfc: tagtinker_nfc_url_host_is() (the URL-host matcher used to classify tag links, e.g. nfc.imagotag.com) plus the new tagtinker_nfc_url_host() extractor, compiled against a minimal mf_ultralight stub. Wires up the previously-unused TAGTINKER_NFC_HOST_LEN: the new tagtinker_nfc_url_host() copies a tag link's host into a caller buffer, bounded by that constant. Hosts come off the tag, so the bound limits what is shown as much as it sizes the buffer. Both suites run as new hard-gate CI jobs (proto, nfc) in build.yml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LXH25ThRXTiYngLefqYdKi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expands host test coverage and puts the
TAGTINKER_NFC_HOST_LENconstant to work. Follows the existing OEPL host-test pattern: the real module source is compiled off-device against tiny stub headers and run in CI with just a C compiler — no Flipper SDK, no hardware, and the tests transmit nothing.Changes
New host test suites + CI gates
test/proto_test.c(+run_proto_test.sh) — covers the pure geometry/layout helpers inprotocol/tagtinker_proto.h: the Color 2.6 wire↔glass coordinate transform, page resolution, width/height swap, and profile glass sizing. No stubs needed (the header is plain C).test/nfc_test.c(+run_nfc_test.sh) — coverstagtinker_nfc_url_host_is()(the URL-host matcher that classifies tag links such asnfc.imagotag.com: scheme stripping, label-boundary check, NULL/empty guards) and the new extractor. Built against a minimalmf_ultralightstub intest/stubs/..github/workflows/build.yml— two new hard-gate jobs,protoandnfc, mirroringoepl.Wire up
TAGTINKER_NFC_HOST_LEN(previously defined but unreferenced)tagtinker_nfc_url_host()innfc/tagtinker_nfc.c/.h: copies a tag link's host into a caller buffer, bounded byTAGTINKER_NFC_HOST_LEN. Hosts come off the tag, so the bound limits what is displayed as much as it sizes the buffer. The constant is now used in shipping code.Docs
test/README.mdupdated for the two new suites and what each covers.Notes
oepl,proto,nfc).Lint (advisory, non-blocking)check stays red — it's the repo's documented pre-existing clang-format condition, unrelated to this change (see the earlier comment on this PR).protocol/tagtinker_proto.cfunctions (tagtinker_crc16, barcode validation, frame builders) — that translation unit includestagtinker_app.h, so covering it off-device needs an app stub; left as a follow-up and noted intest/README.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01LXH25ThRXTiYngLefqYdKi