|
1 | 1 | # Contributing to Ident |
2 | 2 |
|
3 | 3 | Ident is built for people running their own ADS-B receivers. Good contributions |
4 | | -keep that audience in mind: the app should be understandable for receiver |
5 | | -owners, predictable for operators, and straightforward to install on common |
6 | | -receiver hosts. |
| 4 | +keep that audience in mind: the app should be understandable for receiver owners, |
| 5 | +predictable for operators, and straightforward to install on common receiver |
| 6 | +hosts. |
7 | 7 |
|
8 | | -## Before You Open an Issue |
| 8 | +By participating, you agree to abide by the [Code of Conduct](CODE_OF_CONDUCT.md). |
9 | 9 |
|
10 | | -Search existing issues and discussions first. If the problem is a security |
11 | | -issue, do not open a public issue; use the private reporting link in |
12 | | -[SECURITY.md](SECURITY.md). |
| 10 | +## Reporting issues |
13 | 11 |
|
14 | | -Please do not include private station details in public issues. |
| 12 | +Search the existing issues and discussions first. For a security issue, do not |
| 13 | +open a public issue; use |
| 14 | +[private vulnerability reporting](https://github.com/Ident-1090/Ident/security/advisories/new). |
15 | 15 |
|
16 | | -Avoid sharing: |
| 16 | +Do not include private station details in public issues: feeder keys or claim |
| 17 | +tokens, exact receiver coordinates, home or location hints, private hostnames or |
| 18 | +tunnel URLs, or screenshots that reveal where you are. Use placeholders such as |
| 19 | +`receiver.local`, `YOUR_LAT`, `YOUR_LON`, and `YOUR_FEEDER_ID`. |
17 | 20 |
|
18 | | -- feeder keys or claim tokens |
19 | | -- exact receiver coordinates |
20 | | -- home address or location hints |
21 | | -- private hostnames, tunnel URLs, or local network names |
22 | | -- screenshots that reveal private location details |
| 21 | +For install and compatibility reports, include the Ident version, your decoder and |
| 22 | +where it writes `aircraft.json`, which optional files exist (`receiver.json`, |
| 23 | +`stats.json`, `outline.json`), the operating system and hardware, the install |
| 24 | +method, the browser and device used for the UI, and any relevant `identd` logs. |
| 25 | +For UI issues, crop or redact screenshots that reveal your location. |
23 | 26 |
|
24 | | -Use placeholders such as `receiver.local`, `YOUR_LAT`, `YOUR_LON`, and |
25 | | -`YOUR_FEEDER_ID` when an example needs a value. |
| 27 | +## Pull requests |
26 | 28 |
|
27 | | -## Good Bug Reports |
| 29 | +Keep pull requests focused. A small change with clear behavior, tests, and docs is |
| 30 | +easier to review than a broad change that mixes unrelated work. |
28 | 31 |
|
29 | | -For install and compatibility issues, include: |
| 32 | +- Include tests for behavior changes. |
| 33 | +- Update the docs when install, configuration, network access, or user-facing |
| 34 | + behavior changes. |
| 35 | +- Do not add a new external service without documenting the network access. |
| 36 | +- Do not add station-specific examples or private deployment assumptions. |
| 37 | +- Keep receiver data read-only by default; document and justify any write path. |
30 | 38 |
|
31 | | -- Ident version |
32 | | -- receiver JSON source: readsb native, dump1090-fa native including PiAware, or |
33 | | - dump978-fa native including SkyAware978 |
34 | | -- operating system and hardware model |
35 | | -- install method: binary, Docker, systemd, Debian package, or source |
36 | | -- path where `aircraft.json` is written |
37 | | -- which optional files exist, such as `receiver.json`, `stats.json`, or |
38 | | - `outline.json` |
39 | | -- browser and device used for the UI |
40 | | -- relevant `identd` logs |
| 39 | +For local setup, builds, the checks to run, and the pre-commit hook, see the |
| 40 | +[Development guide](https://ident-1090.github.io/Ident/development). |
41 | 41 |
|
42 | | -For UI issues, screenshots are useful. Crop or redact anything that reveals a |
43 | | -private receiver location. |
| 42 | +## Developer Certificate of Origin |
44 | 43 |
|
45 | | -## Pull Requests |
46 | | - |
47 | | -Keep pull requests focused. A small change with clear behavior, tests, and docs |
48 | | -is easier to review than a broad change that mixes unrelated work. |
49 | | - |
50 | | -Expected baseline: |
51 | | - |
52 | | -- include tests for behavior changes |
53 | | -- update docs when install, configuration, network access, or user-facing |
54 | | - behavior changes |
55 | | -- avoid introducing new external services without documenting network access |
56 | | -- do not add station-specific examples or private deployment assumptions |
57 | | -- keep receiver data read-only by default; document and justify any write path |
58 | | - |
59 | | -Before opening a pull request, run the checks that apply to your change. |
60 | | - |
61 | | -```sh |
62 | | -cd ident |
63 | | -pnpm test |
64 | | -pnpm build |
65 | | - |
66 | | -cd ../identd |
67 | | -go test ./... |
68 | | -``` |
69 | | - |
70 | | -If you cannot run a relevant check, say which check you skipped and why. |
71 | | - |
72 | | -### Wire Schemas |
73 | | - |
74 | | -Ident-owned WebSocket and HTTP payload schemas live in `schemas/ident/`. They |
75 | | -are generated from the Go wire structs with `github.com/google/jsonschema-go`. |
76 | | - |
77 | | -Refresh schemas after changing a wire struct: |
| 44 | +Contributions are accepted under the |
| 45 | +[Developer Certificate of Origin](https://developercertificate.org/) (DCO). It |
| 46 | +certifies that you wrote the contribution, or otherwise have the right to submit |
| 47 | +it under the project's license. You agree to it by signing off each commit: |
78 | 48 |
|
79 | 49 | ```sh |
80 | | -cd identd |
81 | | -IDENT_UPDATE_SCHEMAS=1 go test . -run TestIdentSchemasAreCurrent -count=1 |
82 | | -go test . -run TestIdentSchemasAreCurrent -count=1 |
| 50 | +git commit -s |
83 | 51 | ``` |
84 | 52 |
|
85 | | -The normal Go test fails when a committed schema is stale, so CI and the local |
86 | | -pre-commit hook both enforce freshness. |
87 | | - |
88 | | -### Pre-commit hook |
89 | | - |
90 | | -The hook lives at `ident/.husky/pre-commit` and runs three checks: `gofmt` |
91 | | -against `identd/`, `pnpm check-ident-schemas` (the schema-freshness check |
92 | | -above), and `pnpm exec lint-staged` (biome formatting of staged JS/TS/JSON). |
93 | | -Husky installs the hook from `ident/package.json`'s `prepare` script, so you |
94 | | -need to have run `pnpm install` inside `ident/` at least once for the hook to |
95 | | -fire. If your commit fails with "gofmt would rewrite", run `gofmt -w identd/` |
96 | | -and re-stage. |
97 | | - |
98 | | -## Development Notes |
99 | | - |
100 | | -The release architecture is: |
101 | | - |
102 | | -- `ident/`: React web UI |
103 | | -- `identd/`: Go service and embedded release binary |
104 | | -- `packaging/`: Docker, systemd, and package assets |
105 | | - |
106 | | -Development can run the frontend and service separately. Release builds embed |
107 | | -the web UI into `identd`. |
108 | | - |
109 | | -### Internal configuration |
110 | | - |
111 | | -These environment variables exist for development, testing, and operator |
112 | | -overrides. They are intentionally kept out of the user-facing README so the |
113 | | -common installation flow stays short. |
114 | | - |
115 | | -- `IDENT_RELAY_ROUTE_UPSTREAM` — base URL of the airline route lookup |
116 | | - service (default: `https://adsb.im/api/0/routeset`) |
117 | | -- `IDENT_RELAY_ROUTE_TTL_SEC` — how long Ident caches a successful route |
118 | | - lookup before re-querying (default: 5 minutes) |
119 | | -- `IDENT_RELAY_ROUTE_BATCH_MS` — debounce window for coalescing per-callsign |
120 | | - lookups into one upstream request (default: 250 ms) |
121 | | -- `IDENT_UPDATE_API_URL` — GitHub-style releases endpoint Ident polls for |
122 | | - update checks (default: `https://api.github.com`) |
123 | | -- `IDENT_UPDATE_TIMEOUT_SEC` — HTTP timeout for a single update check |
124 | | - (default: 10 s) |
125 | | - |
126 | | -### Diagnostics |
127 | | - |
128 | | -`identd` keeps diagnostics in a TTL-backed store in `identd/diagnostics.go`. |
129 | | -Identity is `(channel, code, scope)` — re-emitting with the same identity |
130 | | -refreshes the entry's TTL and updates mutable fields (severity, message, |
131 | | -action) without producing a duplicate. The store publishes the full snapshot |
132 | | -on the `ident.diagnostics.v1` channel; the frontend replaces its local set |
133 | | -each time. |
134 | | - |
135 | | -Operationally relevant behaviors: |
136 | | - |
137 | | -- Capacity is bounded (200 entries by default). When the cap is reached, the |
138 | | - oldest entry is evicted, the eviction is logged with `slog.Warn` |
139 | | - (`diagnostics: cap reached, dropping oldest`, attributes `channel`, `code`, |
140 | | - `scope`, `severity`, `ageSec`), and the store publishes a self-describing |
141 | | - `diagnostics.store.capacity_exceeded` warning so the UI also shows the |
142 | | - saturation. |
143 | | -- TTLs are picked at the emission site. Sustained conditions re-emit on a |
144 | | - poll cadence and refresh their TTL; transient events use a 5-minute |
145 | | - visibility window; persistent notices use `WithTTL(0)` and stay until |
146 | | - process restart. |
147 | | -- Receiver-derived conditions (producer not classifiable, upstream-type |
148 | | - override mismatch) re-emit every 5 minutes from |
149 | | - `ReemitReceiverConditions` in `identd/producer_status.go` so a static but |
150 | | - misconfigured `receiver.json` doesn't let the diagnostic age out of the |
151 | | - 15-minute window. |
152 | | - |
153 | | -### Capability gating |
154 | | - |
155 | | -`ident.capabilities.v1` reports which fields the current producer can supply |
156 | | -(`producer_provided`, `ident_derived`, or `unavailable`). The status bar omits |
157 | | -rows whose capability is `unavailable` rather than rendering them blank. |
158 | | -Observed capabilities are sticky across receiver reingest with the same |
159 | | -producer kind, and reset on a producer-kind transition — the merge rule is in |
160 | | -`producer_status.go:mergeStrongerCapabilities`. The intent is to avoid row |
161 | | -flicker when a single sample is missing a field; downgrade only happens when |
162 | | -the producer itself changes. |
163 | | - |
164 | | -### Wire schemas |
165 | | - |
166 | | -The eight Ident-owned wire envelopes are generated under `schemas/ident/`: |
167 | | -`ident.aircraft.v1`, `ident.status.v1`, `ident.capabilities.v1`, |
168 | | -`ident.diagnostics.v1`, `ident.rangeOutline.v1`, `ident.config.v1`, |
169 | | -`ident.routes.v1`, `ident.replay.availability.v1`. The `Refresh schemas after |
170 | | -changing a wire struct` section above is the source of truth for regenerating |
171 | | -them. |
172 | | - |
173 | | -## Documentation Style |
174 | | - |
175 | | -Write for receiver owners first, then add the technical detail maintainers need. |
176 | | - |
177 | | -- prefer concrete receiver workflows over abstract feature language |
178 | | -- use placeholders for station-specific values |
179 | | -- mention when a feature depends on an optional file or outside service |
180 | | -- keep install commands minimal and copyable |
181 | | -- do not compare Ident directly to other projects in public docs |
| 53 | +This adds a `Signed-off-by: Your Name <you@example.com>` line to the commit |
| 54 | +message, using the name and email from your Git configuration. The full |
| 55 | +certificate is at <https://developercertificate.org/>. |
0 commit comments