Skip to content

Commit 7622dd9

Browse files
committed
docs(decisions): renumber telemetry decision to ADR-040 [roadmap:v0.10.4]
ADR-039 was claimed by the Lore server identity decision merged on main while this branch was in flight; the telemetry decision and every reference to it move to ADR-040. No behavior change.
1 parent 39492f3 commit 7622dd9

7 files changed

Lines changed: 21 additions & 21 deletions

File tree

rac/decisions/adr-039-guide-local-telemetry.md renamed to rac/decisions/adr-040-guide-local-telemetry.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ schema_version: 1
33
id: RAC-KTY25D945HYK
44
type: decision
55
---
6-
# ADR-039: Guide Local Telemetry
6+
# ADR-040: Guide Local Telemetry
77

88
## Status
99

rac/roadmaps/v0.10.x-guide/v0.10.4-guide-telemetry.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ that signal, search-quality and description investments are guesses.
1919
Telemetry for a trust-first, local-first tool has to be earned, not
2020
assumed. ADR-035 forbids a mandatory RAC cloud dependency, and the
2121
trust-transparency requirement names hosted infrastructure a non-goal.
22-
ADR-039 settles the shape: opt-in, default-off, local-only recording of
22+
ADR-040 settles the shape: opt-in, default-off, local-only recording of
2323
counts and metadata — never tool arguments, never repository content —
2424
with sharing as a deliberate, user-driven act.
2525

@@ -41,10 +41,10 @@ issue URL the user submits with their own account.
4141

4242
## Initiatives
4343

44-
### Initiative 1 — Telemetry Recorder (ADR-039)
44+
### Initiative 1 — Telemetry Recorder (ADR-040)
4545

4646
A stdlib-only recorder module in the server layer: event schema pinned
47-
by ADR-039, append-only JSONL under the XDG state directory, a random
47+
by ADR-040, append-only JSONL under the XDG state directory, a random
4848
per-process session id, single-generation size rotation, and a
4949
never-raise posture — a recorder that cannot write records nothing and
5050
never breaks a tool call.
@@ -83,7 +83,7 @@ telemetry never touches the wire contract.
8383
- No network code anywhere in RAC (ADR-035, rac-trust-transparency);
8484
the share flow builds a URL and the user's browser transmits it.
8585
- Events carry counts and metadata only: no tool arguments, no artifact
86-
IDs, no query strings, no paths, no repository content (ADR-039).
86+
IDs, no query strings, no paths, no repository content (ADR-040).
8787
- Tool descriptions are unchanged (ADR-030).
8888
- The recorder lives in the server layer and imports only the standard
8989
library; Core and services stay telemetry-unaware (ADR-031).
@@ -112,7 +112,7 @@ The following decisions are pinned for v0.10.4.
112112

113113
### Event Schema
114114

115-
One JSON object per line, fields pinned by ADR-039:
115+
One JSON object per line, fields pinned by ADR-040:
116116
`schema_version` (`"1"`), `ts` (ISO 8601 UTC), `session` (random
117117
per-process hex), `tool`, `outcome` (`ok` | `error` | `exception`),
118118
`error` (structured error code, present only when outcome is `error`),
@@ -152,7 +152,7 @@ per-process hex), `tool`, `outcome` (`ok` | `error` | `exception`),
152152
channel is the cost of the trust posture; onboarding docs ask early
153153
users to enable it.
154154
- Future fields drift toward recording content. Mitigated: the schema
155-
is pinned field-for-field in ADR-039 and the battery; adding a field
155+
is pinned field-for-field in ADR-040 and the battery; adding a field
156156
is a recorded decision, not a patch.
157157
- Prefilled-URL length limits. Mitigated: the summary is a few hundred
158158
bytes; the share test pins the URL round-trip.
@@ -166,7 +166,7 @@ per-process hex), `tool`, `outcome` (`ok` | `error` | `exception`),
166166

167167
## Related Decisions
168168

169-
- ADR-039
169+
- ADR-040
170170
- ADR-030
171171
- ADR-031
172172
- ADR-032

src/rac/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ def build_parser() -> argparse.ArgumentParser:
856856
action="store_true",
857857
help=(
858858
"Record tool-call counts and metadata (never arguments or content) "
859-
"to a local log; off by default (ADR-039)."
859+
"to a local log; off by default (ADR-040)."
860860
),
861861
)
862862
p_mcp.set_defaults(func=cmd_mcp)

src/rac/mcp/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
Failed lookups return structured error data, never protocol exceptions
2121
(ADR-034, :mod:`rac.mcp.errors`): an agent recovers from a JSON body.
2222
23-
Opt-in telemetry (v0.10.4, ADR-039): when serving with a recorder, each tool
23+
Opt-in telemetry (v0.10.4, ADR-040): when serving with a recorder, each tool
2424
call routes through :func:`rac.mcp.telemetry.observe`, which times the call,
2525
classifies the structured payload, and returns it unchanged — tool responses
2626
are byte-identical with telemetry on and off, and the log is never an input
@@ -223,7 +223,7 @@ def build_server(
223223
224224
``budget`` is the per-response character cap (ADR-033), configurable here at
225225
startup; there is no per-call override. ``recorder`` enables opt-in usage
226-
telemetry (ADR-039): with ``None`` — the default — nothing is recorded and
226+
telemetry (ADR-040): with ``None`` — the default — nothing is recorded and
227227
every call is exactly the bare tool body. The returned :class:`FastMCP`
228228
instance has the four pinned tools registered and is ready to run over any
229229
transport — the CLI runs it over stdio.
@@ -285,7 +285,7 @@ def run_server(root: str, budget: int = DEFAULT_BUDGET, telemetry_enabled: bool
285285
Emits a one-line notice to stderr when the repository root contains no
286286
recognized artifacts (v0.10.1 startup hardening), and another when
287287
telemetry is enabled — opt-in recording is announced, never silent
288-
(ADR-039).
288+
(ADR-040).
289289
"""
290290
_check_corpus(root)
291291
recorder: TelemetryRecorder | None = None

src/rac/mcp/telemetry.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Opt-in local usage telemetry for Guide (v0.10.4).
22
33
Telemetry answers one product question — is Guide actually used, and which
4-
tools matter — without spending the trust the Guide asks for (ADR-039). The
4+
tools matter — without spending the trust the Guide asks for (ADR-040). The
55
shape is pinned: opt-in and default-off, local-only, and content-free. Events
66
carry counts and metadata; tool arguments, artifact IDs, query strings, paths,
77
and repository content are never recorded.
@@ -44,17 +44,17 @@
4444
from datetime import UTC, datetime
4545
from pathlib import Path
4646

47-
# Pinned event schema version (ADR-039). Bumping it is a recorded decision.
47+
# Pinned event schema version (ADR-040). Bumping it is a recorded decision.
4848
SCHEMA_VERSION = "1"
4949

5050
TELEMETRY_FILENAME = "guide-telemetry.jsonl"
5151

5252
# Rotation threshold: events are ~120 bytes, so 1 MB holds roughly 8,000
5353
# calls. One previous generation is kept (``.1``), bounding disk use at about
54-
# 2 MB with no in-flight rotation and no retention configuration (ADR-039).
54+
# 2 MB with no in-flight rotation and no retention configuration (ADR-040).
5555
MAX_LOG_BYTES = 1_000_000
5656

57-
# Share flow (ADR-039): a prefilled new-issue URL against the repository's
57+
# Share flow (ADR-040): a prefilled new-issue URL against the repository's
5858
# usage-report issue form. Issue forms accept ``?field_id=value`` prefill;
5959
# the user's browser transmits, RAC never does.
6060
SHARE_ISSUE_URL = "https://github.com/tcballard/requirements-as-code/issues/new"
@@ -283,7 +283,7 @@ def share_url(summary: TelemetrySummary) -> str:
283283
"""The prefilled usage-report issue URL for ``summary``.
284284
285285
String formatting only — the user opens the URL, reviews the prefilled
286-
report, and submits it with their own GitHub account (ADR-039). The
286+
report, and submits it with their own GitHub account (ADR-040). The
287287
local log path stays out of the shared report: a home-directory path
288288
can embed a username, and the report is counts and timestamps only.
289289
"""

tests/test_mcp_server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def _fake_run(root: str, telemetry_enabled: bool = False) -> int:
100100
args = parser.parse_args(["mcp", "--root", CORPUS])
101101
assert args.func(args) == cli.EXIT_OK
102102
assert captured["root"] == CORPUS
103-
assert captured["telemetry"] is False, "telemetry is opt-in, default off (ADR-039)"
103+
assert captured["telemetry"] is False, "telemetry is opt-in, default off (ADR-040)"
104104

105105

106106
def test_run_server_returns_zero_on_clean_shutdown(monkeypatch):

tests/test_mcp_telemetry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Guide telemetry contracts — opt-in, local-only, content-free (v0.10.4).
22
3-
The battery pins ADR-039's shape: nothing is recorded without the explicit
3+
The battery pins ADR-040's shape: nothing is recorded without the explicit
44
opt-in; events carry the pinned field set and never tool arguments or
55
repository content; tool responses are byte-identical with a recorder attached
66
and without one (the ADR-032 guard); a recorder that cannot write disables
@@ -41,7 +41,7 @@
4141

4242
DEC = "RAC-MCPDEC000001"
4343

44-
# The pinned event field set, in emission order (ADR-039). ``error`` appears
44+
# The pinned event field set, in emission order (ADR-040). ``error`` appears
4545
# only on error outcomes, between ``outcome`` and ``duration_ms``.
4646
EVENT_FIELDS = ["schema_version", "ts", "session", "tool", "outcome", "duration_ms", "truncated"]
4747
EVENT_FIELDS_ERROR = [
@@ -143,7 +143,7 @@ def test_each_tool_records_exactly_one_pinned_event(tmp_path):
143143

144144

145145
def test_events_never_carry_arguments_or_content(tmp_path):
146-
# The content-free guarantee is a test, not a comment (ADR-039): the
146+
# The content-free guarantee is a test, not a comment (ADR-040): the
147147
# artifact ID argument and the repository content the call returned must
148148
# not appear anywhere in the log.
149149
recorder = make_recorder(tmp_path)

0 commit comments

Comments
 (0)