Skip to content

Conversation

@tzanko-matev
Copy link
Contributor

We now emit a Return event at the end of the trace which contains the exit code of the script which we are tracing.

We have also consolidated the logic which decides whether to handle an event or not. We have combined the activation and filtering logic into a

design-docs/adr/0015-balanced-toplevel-lifecycle-and-trace-gating.md: 
design-docs/toplevel-exit-and-trace-gating-implementation-plan.md: 

Signed-off-by: Tzanko Matev <[email protected]>
codetracer-python-recorder/codetracer_python_recorder/cli.py: 
codetracer-python-recorder/codetracer_python_recorder/session.py: 
codetracer-python-recorder/src/session.rs: 
codetracer-python-recorder/tests/python/unit/test_auto_start.py: 
codetracer-python-recorder/tests/python/unit/test_session_helpers.py: 
design-docs/toplevel-exit-and-trace-gating-implementation-plan.status.md: 
pytest.log: 
pytest_case.log: 

Signed-off-by: Tzanko Matev <[email protected]>
codetracer-python-recorder/src/monitoring/api.rs: 
codetracer-python-recorder/src/monitoring/install.rs: 
codetracer-python-recorder/src/monitoring/mod.rs: 
codetracer-python-recorder/src/runtime/tracer/events.rs: 
codetracer-python-recorder/src/runtime/tracer/runtime_tracer.rs: 
codetracer-python-recorder/src/session.rs: 
codetracer-python-recorder/tests/python/test_exit_payloads.py: 
design-docs/toplevel-exit-and-trace-gating-implementation-plan.status.md: 

Signed-off-by: Tzanko Matev <[email protected]>
codetracer-python-recorder/src/runtime/tracer/events.rs: 
codetracer-python-recorder/src/runtime/tracer/lifecycle.rs: 
codetracer-python-recorder/src/runtime/tracer/runtime_tracer.rs: 
codetracer-python-recorder/tests/python/test_exit_payloads.py: 
codetracer-python-recorder/tests/python/test_trace_balance.py: 
design-docs/toplevel-exit-and-trace-gating-implementation-plan.status.md: 

Signed-off-by: Tzanko Matev <[email protected]>
@tzanko-matev
Copy link
Contributor Author

@codex review

@github-actions
Copy link

Coverage Summary

Rust (lines)
82.1% covered (8,305 / 10,115 | 1,810 missed)

File Lines Miss Cover
codetracer-python-recorder/src/logging/logger.rs 273 64 76.6%
codetracer-python-recorder/src/module_identity.rs 376 51 86.4%
codetracer-python-recorder/src/monitoring/api.rs 169 156 7.7%
codetracer-python-recorder/src/monitoring/callbacks.rs 589 68 88.5%
codetracer-python-recorder/src/runtime/frame_inspector.rs 148 63 57.4%
codetracer-python-recorder/src/runtime/io_capture/fd_mirror/unix.rs 376 79 79.0%
codetracer-python-recorder/src/runtime/io_capture/proxies/common.rs 159 62 61.0%
codetracer-python-recorder/src/runtime/io_capture/proxies/input.rs 128 91 28.9%
codetracer-python-recorder/src/runtime/io_capture/proxies/output.rs 41 27 34.1%
codetracer-python-recorder/src/runtime/tracer/events.rs 410 192 53.2%
codetracer-python-recorder/src/runtime/tracer/filtering.rs 128 32 75.0%
codetracer-python-recorder/src/runtime/tracer/io.rs 158 31 80.4%
codetracer-python-recorder/src/runtime/tracer/lifecycle.rs 278 71 74.5%
codetracer-python-recorder/src/runtime/tracer/runtime_tracer.rs 2,016 63 96.9%
codetracer-python-recorder/src/runtime/value_capture.rs 267 85 68.2%
codetracer-python-recorder/src/session.rs 84 84 0.0%
codetracer-python-recorder/src/session/bootstrap/filesystem.rs 90 32 64.4%
codetracer-python-recorder/src/trace_filter/engine.rs 599 52 91.3%
codetracer-python-recorder/src/trace_filter/loader.rs 445 202 54.6%
codetracer-python-recorder/src/trace_filter/selector.rs 258 66 74.4%
Showing top 20 entries by missed lines (of 53 total).

Python (statements)
78.1% covered (278 / 356 | 78 missed)

File Stmts Miss Cover
codetracer-python-recorder/codetracer_python_recorder/__init__.py 7 0 100.0%
codetracer-python-recorder/codetracer_python_recorder/__main__.py 2 2 0.0%
codetracer-python-recorder/codetracer_python_recorder/api.py 5 0 100.0%
codetracer-python-recorder/codetracer_python_recorder/auto_start.py 24 2 91.7%
codetracer-python-recorder/codetracer_python_recorder/cli.py 142 62 56.3%
codetracer-python-recorder/codetracer_python_recorder/formats.py 13 1 92.3%
codetracer-python-recorder/codetracer_python_recorder/session.py 111 5 95.5%
codetracer-python-recorder/codetracer_python_recorder/trace_balance.py 52 6 88.5%

Generated automatically via generate_coverage_comment.py.

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Base automatically changed from helper-script-balanced-trace to main October 28, 2025 09:47
@tzanko-matev tzanko-matev merged commit 45ec79c into main Oct 28, 2025
3 checks passed
@tzanko-matev tzanko-matev deleted the toplevel-return-event branch October 28, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants