Skip to content

feat(trace)!: report argument types instead of values - #7

Merged
shadowhand merged 2 commits into
mainfrom
feat/argument-types
Oct 1, 2026
Merged

shadowhand merged 2 commits into
mainfrom
feat/argument-types

Conversation

@shadowhand

Copy link
Copy Markdown
Owner

Summary

Trace frame args now carries type names only, one per argument, in order, instead of sanitized values.

  • get_debug_type() names every value, except arrays, which split into vec (list) and dict (associative).
  • A SensitiveParameterValue is unwrapped with getValue() and its inner value typed, so the protected value's type is reported but never the value.
"args": ["int", "string", "bool", "null", "float", "vec", "dict", "stdClass", "Errata\\Mode", "Closure"]

Why

No argument value can ever reach the response or the trace. That removes the entire sanitizer: no depth/item/length limits, no cycle detection, no __toString avoidance, and no redaction markers.

Changes

  • New src/Trace/ArgumentTyper.php — the whole feature is one method.
  • src/Trace/TraceFactory.php — depends on ArgumentTyper; args() maps each argument to its type.
  • src/Document/Frame.php — args is now list<string>|null.
  • src/ExceptionHandler.php — wiring.
  • Deleted src/Trace/ArgumentSanitizer.php, src/Document/SanitizedMap.php, src/Document/SanitizedObject.php.
  • Tests: new ArgumentTyperTest; updated TraceFactoryTest/FrameTest; removed the sanitizer tests and fixtures.
  • Demos: new /types route; recursion no longer builds a cyclic graph.
  • Docs: README, CHANGELOG, spec (new amendment plus decisions/package/trace-pipeline/testing updates), and the implementation plan.

Breaking change

The args member's contents change from sanitized values to type-name strings.

Validation

composer run verify — format, lint, analyze, 83 tests, 100% coverage.


Note: this branch also carries the pre-existing local chore: clean up comments and names commit (fa84bfb), which was already on main locally and could not be cleanly separated.

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

🏹 Robin

✅ Review done. Nothing worth flagging — looks clean to me.

Push fixes whenever you like, then comment /robin for another pass.

Robin v2.9.0 · antongulin/robin@main (f97948f) · diff-only review (agent mode off)

@shadowhand shadowhand changed the title Report trace argument types instead of values refactor: report trace argument types instead of values Oct 1, 2026
@shadowhand shadowhand changed the title refactor: report trace argument types instead of values feat(trace)!: report argument types instead of values Oct 1, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏹 Robin

Heads up: this is a point-in-time review. Push fixes freely, then comment /robin whenever you want another pass.

✅ No issues found


Robin — the Robin Hood of code review. Free for every PR.

@shadowhand
shadowhand merged commit adb2846 into main Oct 1, 2026
3 checks passed
@shadowhand
shadowhand deleted the feat/argument-types branch October 1, 2026 21:02
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.

1 participant