conformance(runner): reject boolean/float level, invalid fmt, and malformed caller options at run() entry
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
Research direction
Start with conformance/src/trace_tests/runner.py, especially run() and _run_levels() around lines 128–185, and review the linked pull request #631 to see the work already underway. Check how the entry points validate their arguments; done means invalid levels and caller options are rejected at both entry points.
Written by the indexing model from the issue text.
Description
Summary
run() and _run_levels() in conformance/src/trace_tests/runner.py (lines 128-185) have entry-validation gaps:
-
Boolean and integral-float
levelaccepted inrun()(conformance/src/trace_tests/runner.pylines 142-143):_run_levels()checksany(type(level) is not int for level in attempted), butrun()only checksif level not in _LEVEL_MODULES:.- Because
True == 1,False == 0, and1.0 == 1in Python dict lookup,run(record, fmt, True),run(record, fmt, False), andrun(record, fmt, 1.0)silently execute Level 1 / Level 0 instead of raisingValueError.
-
Unvalidated caller parameters (
record,fmt,max_age_seconds,expected_nonce,receipt,entry,policy_resolver) atrun()and_run_levels()entry:- Passing a non-dict
recordor an unknownfmt(anything other than"trace"or"cmcp-runtime") is not rejected at entry (extract_tracefalls through to returningrecordfor anyfmt != "cmcp-runtime"). - Passing
max_age_seconds=True,max_age_seconds=0,max_age_seconds=-1, a non-stringexpected_nonce, a non-dictreceipt/entry, or a non-callablepolicy_resolveris not rejected atrun()/_run_levels()entry.
- Passing a non-dict
Proposed Fix
- Validate
type(level) is int and level in _LEVEL_MODULESinrun(). - Validate
isinstance(record, dict),fmt in ("trace", "cmcp-runtime"),type(max_age_seconds) is int and max_age_seconds >= 1,expected_nonce is None or isinstance(expected_nonce, str),receipt is None or isinstance(receipt, dict),entry is None or isinstance(entry, dict), andpolicy_resolver is None or callable(policy_resolver)at entry in bothrun()and_run_levels().
- Dominant language
- Python
- Stars
- 37
- Forks
- 33
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 111
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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 agentrust-io/trace-spec
-
prototype(verifier_token,execution_appraisal): enforce canonical 32-byte nonces, validate RelyingParty.challenge/verify_proof inputs, and reject non-finite JWT JSONPossibly taken @drk-ram claimed this 1 day ago. Openneeds-review:MEDIUM
Difficulty 4/5 3-5 days Newbie friendliness 35/100
agentrust-io/trace-spec#629 · 1 comment ·
Maintainers usually reply within 1 day
-
fix(platform_measurement): reject non-string or empty runtime.measurement across Python and TypeScriptPossibly taken @drk-ram claimed this 1 day ago. Openneeds-review:MEDIUM
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
agentrust-io/trace-spec#628 · 1 comment ·
Maintainers usually reply within 1 day
-
fix(provenance,validate): remove str() coercion on digest/hash fields in provenance and enforce strict JSON in schema loadersPossibly taken @drk-ram claimed this 1 day ago. Openneeds-review:MEDIUM
Difficulty 3/5 1-2 days Newbie friendliness 35/100
agentrust-io/trace-spec#627 · 1 comment ·
Maintainers usually reply within 1 day
-
conformance(inclusion): enforce registry-anchor-v1 surrogate/key/cycle rules and validate leaf_index/entry fieldsPossibly taken @drk-ram claimed this 1 day ago. Openneeds-review:MEDIUM
Difficulty 3/5 1-2 days Newbie friendliness 35/100
agentrust-io/trace-spec#625 · 1 comment ·
Maintainers usually reply within 1 day
-
prototype(azure_execution_binding): bind HCLAkPub exponent e and key size, reject duplicate JSON keys, and harden _secure_boot_state and authenticode_sha256Possibly taken @drk-ram claimed this 3 days ago. Openneeds-review:MEDIUM
Difficulty 4/5 3-5 days Newbie friendliness 20/100
agentrust-io/trace-spec#613 · 1 comment ·
Maintainers usually reply within 1 day
All issues in agentrust-io/trace-spec
Similar issues
-
request-theme
Difficulty 1/5 Under an hour Newbie friendliness 66/100
LizardByte/ThemerrDB#9575 ·
Maintainers usually reply within 1 day
-
author-page correction
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
acl-org/acl-anthology#10599 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
zilliztech/memsearch#818 ·
Maintainers usually reply within 1 day
-
[FAQ] Commit ID for ProjectsPossibly taken @github-actions claimed this today. Openfaq-proposal
Difficulty 1/5 Under an hour Newbie friendliness 84/100
DataTalksClub/faq#503 · 1 comment ·
Maintainers usually reply within 2 days
-
README.zh-CN/ja/es still hard-code 501 test counts after README.md went count-freePossibly taken @Aaqibhafeezkhan claimed this today. Openbeginner documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BistaDinesh03/critique#164 · 1 comment ·
Maintainers usually reply within 1 day