fix: README quick start crashes on string arguments
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 78/100
Research direction
Start with record in src/agenttrace/tracer.py and compute_hash in src/agenttrace/schema.py, then inspect generate_report in src/agenttrace/report.py and AgentTracer.verify. Reproduce the README quick start and report examples as written, then add tests for string enum values and string paths. Done means both examples run without AttributeError and the tests pass.
Written by the indexing model from the issue text.
Description
The README and docstrings pass policy_decision="allow" to record_decision, but record in src/agenttrace/tracer.py stores the string as is and compute_hash in src/agenttrace/schema.py calls .value on it, which raises AttributeError. generate_report in src/agenttrace/report.py and AgentTracer.verify also fail on a str path such as "bundle.jsonl", which the README shows. Convert strings to PolicyDecision, RiskTier and EventType in record, wrap path arguments in pathlib.Path, and add tests that run the README examples as written.
Reproduced with:
$ cat quickstart.py
from agenttrace import AgentTracer
tracer = AgentTracer(agent_id="my-research-agent", framework="langgraph")
tracer.start_session()
tracer.record_decision(action="summarise findings", policy_decision="allow")
$ python quickstart.py 2>&1 | tail -1
AttributeError: 'str' object has no attribute 'value'
$ cat report_str.py
from agenttrace import generate_report
generate_report("bundle.jsonl")
$ python report_str.py 2>&1 | tail -1
AttributeError: 'str' object has no attribute 'open'
- Dominant language
- Python
- Stars
- 0
- Forks
- 1
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from obielin/agenttrace
-
enhancement good first issue
Difficulty 3/5 1-2 days Newbie friendliness 72/100
obielin/agenttrace#12 ·
-
enhancement help wanted
Difficulty 4/5 3-5 days Newbie friendliness 58/100
obielin/agenttrace#11 ·
-
enhancement help wanted
Difficulty 4/5 3-5 days Newbie friendliness 55/100
obielin/agenttrace#10 ·
-
help wanted refactor
Difficulty 3/5 1-2 days Newbie friendliness 69/100
obielin/agenttrace#9 ·
-
feat: add the trace_tool context manager from the AgentTracer docstringPossibly taken @zheng-guannan577 claimed this 17 days ago. Openenhancement good first issue
Difficulty 3/5 1-2 days Newbie friendliness 68/100
obielin/agenttrace#6 ·
All issues in obielin/agenttrace
Similar issues
-
A new VOLTTRON_HOME starts with agent isolation mode on (string comparison of a boolean default)Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
llm translation
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
FAIRmat-NFDI/sand#239 ·
Maintainers usually reply within 1 day
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
coco-research/coco#539 ·
Maintainers usually reply within 1 day
-
dependencies
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
JustBeanie/hass-volcano-hybrid#34 ·
Maintainers usually reply within 1 day