Skip to content

Commit bca666d

Browse files
committed
Add new issues
1 parent 1aa644a commit bca666d

File tree

1 file changed

+59
-14
lines changed

1 file changed

+59
-14
lines changed

issues.md

Lines changed: 59 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,17 @@ to preserve structure.
6060
- Comprehensive tests cover each argument kind and validate the encoded structure and values.
6161

6262
### Status
63-
Partially done
64-
65-
Structured encoding for varargs is implemented in the Rust tracer:
66-
- Python `tuple` encodes as `Tuple` (elements recursively encoded).
67-
- Python `list` encodes as `Sequence` (non-slice; elements recursively encoded).
68-
69-
Keyword-only and kwargs capture remain in place; kwargs still encode as `Raw`
70-
due to the lack of a mapping value in the `runtime_tracing` format. See
71-
ISSUE-008 for tracking structured kwargs encoding support.
63+
Done
7264

73-
Note: The Definition of Done mentions "list" for `*args`, but CPython passes
74-
varargs as a tuple; the backend now preserves that shape (`Tuple`), which the
75-
tests also accept. The remaining gap is structured kwargs.
65+
All argument kinds are captured on function entry, including kwargs with
66+
structured encoding. Varargs are preserved as `Tuple` (per CPython), and
67+
`**kwargs` are encoded as a `Sequence` of 2-element `Tuple`s `(key, value)`
68+
with string keys, enabling lossless downstream analysis. The updated test
69+
`test_all_argument_kinds_recorded_on_py_start` verifies the behavior.
7670

77-
Dependent issues: ISSUE-008
71+
Note: While the original Definition of Done referenced a mapping value kind,
72+
the implementation follows the proposed approach in ISSUE-008 to represent
73+
kwargs as a sequence of tuples using existing value kinds.
7874

7975
## ISSUE-005
8076
### Description
@@ -248,4 +244,53 @@ be recorded losslessly with key/value structure and recursively encoded values.
248244
- Blocks completion of ISSUE-002
249245

250246
### Status
251-
Not started
247+
Done
248+
249+
Implemented structured kwargs encoding in the Rust tracer by representing
250+
Python `dict` as a `Sequence` of `(key, value)` `Tuple`s, with keys encoded as
251+
`String` when possible. Tests in
252+
`codetracer-python-recorder/test/test_monitoring_events.py` validate that
253+
kwargs are recorded structurally. This fulfills the goal without introducing a
254+
new mapping value kind, per the proposed solution.
255+
256+
257+
## ISSUE-009
258+
### Description
259+
Unify list/sequence `lang_type` naming across recorders. The Rust tracer now
260+
emits `TypeKind::Seq` with name "List" for Python `list`, while the
261+
pure-Python recorder uses "Array". This divergence can fragment the trace
262+
schema and complicate downstream consumers.
263+
264+
### Definition of Done
265+
- Both recorders emit the same `lang_type` for Python list values.
266+
- Fixtures and docs/spec are updated to reflect the chosen term.
267+
- Cross-recorder tests pass with consistent types.
268+
269+
### Proposed solution
270+
- We will use "List" in order to match existing Python nomenclature
271+
272+
### Status
273+
Low priority. We won't work on this unless it blocks another issue.
274+
275+
276+
## ISSUE-010
277+
### Description
278+
Clarify scope of dict structural encoding and key typing. The current change
279+
encodes any Python `dict` as a `Sequence` of `(key, value)` tuples and falls
280+
back to generic encoding for non-string keys. Repo rules favor fail-fast over
281+
defensive fallbacks, and ISSUE-008 focused specifically on `**kwargs`.
282+
283+
### Definition of Done
284+
- Decide whether structural dict encoding should apply only to kwargs or to all
285+
dict values; document the choice.
286+
- If limited to kwargs, restrict structured encoding to kwargs capture sites.
287+
- If applied generally, define behavior for non-string keys (e.g., fail fast)
288+
and add tests for nested and non-string-key dicts.
289+
290+
### Proposed solution
291+
- Prefer failing fast on non-string keys in contexts representing kwargs; if
292+
general dict encoding is retained, update the spec and tests and remove the
293+
defensive fallback for key encoding.
294+
295+
### Status
296+
Low priority. We won't work on this until a user reports that it causes issues.

0 commit comments

Comments
 (0)