agent-reliability 1.0.0rc1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. agent_reliability-1.0.0rc1/.github/ISSUE_TEMPLATE/bug_report.yml +34 -0
  2. agent_reliability-1.0.0rc1/.github/ISSUE_TEMPLATE/feature_request.yml +24 -0
  3. agent_reliability-1.0.0rc1/.github/pull_request_template.md +36 -0
  4. agent_reliability-1.0.0rc1/.github/workflows/ci.yml +84 -0
  5. agent_reliability-1.0.0rc1/.github/workflows/release.yml +100 -0
  6. agent_reliability-1.0.0rc1/.gitignore +24 -0
  7. agent_reliability-1.0.0rc1/CHANGELOG.md +148 -0
  8. agent_reliability-1.0.0rc1/CODE_OF_CONDUCT.md +38 -0
  9. agent_reliability-1.0.0rc1/CONTRIBUTING.md +62 -0
  10. agent_reliability-1.0.0rc1/LICENSE +201 -0
  11. agent_reliability-1.0.0rc1/PKG-INFO +209 -0
  12. agent_reliability-1.0.0rc1/README.md +175 -0
  13. agent_reliability-1.0.0rc1/SECURITY.md +41 -0
  14. agent_reliability-1.0.0rc1/benchmarks/bench_evaluation.py +83 -0
  15. agent_reliability-1.0.0rc1/benchmarks/bench_otel.py +104 -0
  16. agent_reliability-1.0.0rc1/benchmarks/bench_reliability.py +97 -0
  17. agent_reliability-1.0.0rc1/benchmarks/bench_sdk.py +123 -0
  18. agent_reliability-1.0.0rc1/docs/ARCHITECTURE.md +189 -0
  19. agent_reliability-1.0.0rc1/docs/COMPATIBILITY.md +35 -0
  20. agent_reliability-1.0.0rc1/docs/CONCEPTS.md +69 -0
  21. agent_reliability-1.0.0rc1/docs/DOMAIN_MODEL.md +287 -0
  22. agent_reliability-1.0.0rc1/docs/DX_REVIEW.md +146 -0
  23. agent_reliability-1.0.0rc1/docs/ENGINEERING_PRINCIPLES.md +117 -0
  24. agent_reliability-1.0.0rc1/docs/EVALUATION_PROVENANCE.md +90 -0
  25. agent_reliability-1.0.0rc1/docs/EVALUATOR_FRAMEWORK.md +128 -0
  26. agent_reliability-1.0.0rc1/docs/GA_CONTRACT.md +241 -0
  27. agent_reliability-1.0.0rc1/docs/GA_READINESS.md +92 -0
  28. agent_reliability-1.0.0rc1/docs/INTEGRATIONS.md +61 -0
  29. agent_reliability-1.0.0rc1/docs/LOCAL_RELIABILITY_ENGINE.md +172 -0
  30. agent_reliability-1.0.0rc1/docs/OTEL_MAPPING.md +168 -0
  31. agent_reliability-1.0.0rc1/docs/PUBLIC_API_REVIEW.md +52 -0
  32. agent_reliability-1.0.0rc1/docs/QUICKSTART.md +79 -0
  33. agent_reliability-1.0.0rc1/docs/README.md +44 -0
  34. agent_reliability-1.0.0rc1/docs/RELEASING.md +64 -0
  35. agent_reliability-1.0.0rc1/docs/ROADMAP.md +111 -0
  36. agent_reliability-1.0.0rc1/docs/SDK_DESIGN.md +475 -0
  37. agent_reliability-1.0.0rc1/docs/SECURITY_MODEL.md +179 -0
  38. agent_reliability-1.0.0rc1/docs/SLO_SEMANTICS.md +242 -0
  39. agent_reliability-1.0.0rc1/docs/TELEMETRY_SPEC.md +99 -0
  40. agent_reliability-1.0.0rc1/docs/TESTING_STRATEGY.md +204 -0
  41. agent_reliability-1.0.0rc1/docs/VERSIONING.md +71 -0
  42. agent_reliability-1.0.0rc1/docs/VISION.md +73 -0
  43. agent_reliability-1.0.0rc1/docs/adr/0001-architecture-boundaries.md +118 -0
  44. agent_reliability-1.0.0rc1/docs/adr/0002-reliability-mathematics-and-undefined-data-semantics.md +295 -0
  45. agent_reliability-1.0.0rc1/docs/adr/0003-python-sdk-runtime-and-context-architecture.md +132 -0
  46. agent_reliability-1.0.0rc1/docs/adr/0004-instrumentation-failure-isolation.md +197 -0
  47. agent_reliability-1.0.0rc1/docs/adr/0005-instrumentation-initialization-degraded-mode.md +193 -0
  48. agent_reliability-1.0.0rc1/docs/adr/0006-opentelemetry-interoperability-and-context-ownership.md +127 -0
  49. agent_reliability-1.0.0rc1/docs/adr/0007-evaluator-architecture-and-provenance-semantics.md +112 -0
  50. agent_reliability-1.0.0rc1/docs/adr/0008-reliability-aggregation-and-provenance-compatibility.md +116 -0
  51. agent_reliability-1.0.0rc1/docs/adr/README.md +59 -0
  52. agent_reliability-1.0.0rc1/examples/.gitkeep +0 -0
  53. agent_reliability-1.0.0rc1/examples/async_agent.py +69 -0
  54. agent_reliability-1.0.0rc1/examples/basic_reliability.py +81 -0
  55. agent_reliability-1.0.0rc1/examples/opentelemetry_example.py +25 -0
  56. agent_reliability-1.0.0rc1/examples/provenance_conflict.py +49 -0
  57. agent_reliability-1.0.0rc1/pyproject.toml +109 -0
  58. agent_reliability-1.0.0rc1/scripts/verify_release_artifacts.py +212 -0
  59. agent_reliability-1.0.0rc1/src/agent_reliability/__init__.py +14 -0
  60. agent_reliability-1.0.0rc1/src/agent_reliability/adapters/__init__.py +31 -0
  61. agent_reliability-1.0.0rc1/src/agent_reliability/adapters/event_sinks.py +82 -0
  62. agent_reliability-1.0.0rc1/src/agent_reliability/adapters/otel/__init__.py +13 -0
  63. agent_reliability-1.0.0rc1/src/agent_reliability/adapters/otel/run_context.py +109 -0
  64. agent_reliability-1.0.0rc1/src/agent_reliability/adapters/system_clock.py +14 -0
  65. agent_reliability-1.0.0rc1/src/agent_reliability/adapters/uuid_run_id_generator.py +15 -0
  66. agent_reliability-1.0.0rc1/src/agent_reliability/application/__init__.py +3 -0
  67. agent_reliability-1.0.0rc1/src/agent_reliability/domain/__init__.py +66 -0
  68. agent_reliability-1.0.0rc1/src/agent_reliability/domain/error_budget.py +153 -0
  69. agent_reliability-1.0.0rc1/src/agent_reliability/domain/evaluation.py +36 -0
  70. agent_reliability-1.0.0rc1/src/agent_reliability/domain/identity.py +43 -0
  71. agent_reliability-1.0.0rc1/src/agent_reliability/domain/runs.py +111 -0
  72. agent_reliability-1.0.0rc1/src/agent_reliability/domain/sli.py +221 -0
  73. agent_reliability-1.0.0rc1/src/agent_reliability/domain/slo.py +152 -0
  74. agent_reliability-1.0.0rc1/src/agent_reliability/evaluation/__init__.py +35 -0
  75. agent_reliability-1.0.0rc1/src/agent_reliability/evaluation/_validation.py +48 -0
  76. agent_reliability-1.0.0rc1/src/agent_reliability/evaluation/builtins.py +68 -0
  77. agent_reliability-1.0.0rc1/src/agent_reliability/evaluation/identity.py +32 -0
  78. agent_reliability-1.0.0rc1/src/agent_reliability/evaluation/protocols.py +46 -0
  79. agent_reliability-1.0.0rc1/src/agent_reliability/evaluation/result.py +110 -0
  80. agent_reliability-1.0.0rc1/src/agent_reliability/experimental/__init__.py +9 -0
  81. agent_reliability-1.0.0rc1/src/agent_reliability/ports/__init__.py +43 -0
  82. agent_reliability-1.0.0rc1/src/agent_reliability/ports/clock.py +26 -0
  83. agent_reliability-1.0.0rc1/src/agent_reliability/ports/event_sink.py +36 -0
  84. agent_reliability-1.0.0rc1/src/agent_reliability/ports/events.py +101 -0
  85. agent_reliability-1.0.0rc1/src/agent_reliability/ports/id_generator.py +24 -0
  86. agent_reliability-1.0.0rc1/src/agent_reliability/ports/run_context.py +28 -0
  87. agent_reliability-1.0.0rc1/src/agent_reliability/py.typed +1 -0
  88. agent_reliability-1.0.0rc1/src/agent_reliability/reliability/__init__.py +21 -0
  89. agent_reliability-1.0.0rc1/src/agent_reliability/reliability/engine.py +156 -0
  90. agent_reliability-1.0.0rc1/src/agent_reliability/reliability/model.py +191 -0
  91. agent_reliability-1.0.0rc1/src/agent_reliability/sdk/__init__.py +57 -0
  92. agent_reliability-1.0.0rc1/src/agent_reliability/sdk/client.py +476 -0
  93. agent_reliability-1.0.0rc1/src/agent_reliability/sdk/context.py +151 -0
  94. agent_reliability-1.0.0rc1/src/agent_reliability/sdk/diagnostics.py +85 -0
  95. agent_reliability-1.0.0rc1/src/agent_reliability/sdk/evaluator_runner.py +165 -0
  96. agent_reliability-1.0.0rc1/tests/compat/test_public_api_1_0.py +175 -0
  97. agent_reliability-1.0.0rc1/tests/compat/test_semantic_1_0.py +154 -0
  98. agent_reliability-1.0.0rc1/tests/contract/.gitkeep +0 -0
  99. agent_reliability-1.0.0rc1/tests/contract/test_examples.py +73 -0
  100. agent_reliability-1.0.0rc1/tests/contract/test_reliability_m1_contract.py +56 -0
  101. agent_reliability-1.0.0rc1/tests/contract/test_run_context_bridge.py +218 -0
  102. agent_reliability-1.0.0rc1/tests/fakes/__init__.py +4 -0
  103. agent_reliability-1.0.0rc1/tests/fakes/clock.py +27 -0
  104. agent_reliability-1.0.0rc1/tests/fakes/diagnostics.py +23 -0
  105. agent_reliability-1.0.0rc1/tests/fakes/id_generator.py +23 -0
  106. agent_reliability-1.0.0rc1/tests/fakes/sinks.py +38 -0
  107. agent_reliability-1.0.0rc1/tests/integration/.gitkeep +0 -0
  108. agent_reliability-1.0.0rc1/tests/integration/test_otel_trace_context.py +535 -0
  109. agent_reliability-1.0.0rc1/tests/property/test_error_budget_properties.py +148 -0
  110. agent_reliability-1.0.0rc1/tests/property/test_evaluator_properties.py +24 -0
  111. agent_reliability-1.0.0rc1/tests/property/test_reliability_properties.py +139 -0
  112. agent_reliability-1.0.0rc1/tests/property/test_sdk_properties.py +80 -0
  113. agent_reliability-1.0.0rc1/tests/property/test_sli_properties.py +155 -0
  114. agent_reliability-1.0.0rc1/tests/security/test_privacy_contract.py +37 -0
  115. agent_reliability-1.0.0rc1/tests/typing/installed_consumer.py +41 -0
  116. agent_reliability-1.0.0rc1/tests/typing/mypy.ini +5 -0
  117. agent_reliability-1.0.0rc1/tests/unit/adapters/test_adapters.py +203 -0
  118. agent_reliability-1.0.0rc1/tests/unit/domain/test_error_budget.py +151 -0
  119. agent_reliability-1.0.0rc1/tests/unit/domain/test_evaluation.py +18 -0
  120. agent_reliability-1.0.0rc1/tests/unit/domain/test_identity.py +43 -0
  121. agent_reliability-1.0.0rc1/tests/unit/domain/test_runs.py +125 -0
  122. agent_reliability-1.0.0rc1/tests/unit/domain/test_sli.py +227 -0
  123. agent_reliability-1.0.0rc1/tests/unit/domain/test_slo.py +136 -0
  124. agent_reliability-1.0.0rc1/tests/unit/evaluation/__init__.py +1 -0
  125. agent_reliability-1.0.0rc1/tests/unit/evaluation/test_builtins_and_protocols.py +92 -0
  126. agent_reliability-1.0.0rc1/tests/unit/evaluation/test_identity_and_result.py +156 -0
  127. agent_reliability-1.0.0rc1/tests/unit/evaluation/test_runner.py +258 -0
  128. agent_reliability-1.0.0rc1/tests/unit/ports/test_events.py +59 -0
  129. agent_reliability-1.0.0rc1/tests/unit/reliability/test_engine.py +349 -0
  130. agent_reliability-1.0.0rc1/tests/unit/reliability/test_model.py +300 -0
  131. agent_reliability-1.0.0rc1/tests/unit/sdk/test_evaluation_integration.py +204 -0
  132. agent_reliability-1.0.0rc1/tests/unit/sdk/test_failure_isolation.py +650 -0
  133. agent_reliability-1.0.0rc1/tests/unit/sdk/test_lifecycle_async.py +141 -0
  134. agent_reliability-1.0.0rc1/tests/unit/sdk/test_lifecycle_sync.py +156 -0
  135. agent_reliability-1.0.0rc1/tests/unit/sdk/test_memory.py +49 -0
  136. agent_reliability-1.0.0rc1/tests/unit/sdk/test_nesting.py +59 -0
  137. agent_reliability-1.0.0rc1/tests/unit/sdk/test_threading.py +143 -0
  138. agent_reliability-1.0.0rc1/tests/unit/test_package.py +45 -0
@@ -0,0 +1,34 @@
1
+ name: Bug report
2
+ description: Report reproducible incorrect behavior
3
+ title: "[Bug]: "
4
+ labels: [bug]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: Security vulnerabilities must not be reported here; follow SECURITY.md.
9
+ - type: textarea
10
+ id: behavior
11
+ attributes:
12
+ label: Observed behavior
13
+ description: What happened, and what did you expect instead?
14
+ validations:
15
+ required: true
16
+ - type: textarea
17
+ id: reproduce
18
+ attributes:
19
+ label: Minimal reproduction
20
+ description: Include the smallest safe code sample and traceback with secrets removed.
21
+ validations:
22
+ required: true
23
+ - type: input
24
+ id: version
25
+ attributes:
26
+ label: Agent Reliability version
27
+ validations:
28
+ required: true
29
+ - type: input
30
+ id: python
31
+ attributes:
32
+ label: Python version and operating system
33
+ validations:
34
+ required: true
@@ -0,0 +1,24 @@
1
+ name: Feature request
2
+ description: Propose an OSS reliability use case or improvement
3
+ title: "[Feature]: "
4
+ labels: [enhancement]
5
+ body:
6
+ - type: textarea
7
+ id: problem
8
+ attributes:
9
+ label: Problem
10
+ description: What developer or reliability problem cannot be solved today?
11
+ validations:
12
+ required: true
13
+ - type: textarea
14
+ id: proposal
15
+ attributes:
16
+ label: Proposed outcome
17
+ description: Describe the desired behavior, not only an API shape.
18
+ validations:
19
+ required: true
20
+ - type: textarea
21
+ id: alternatives
22
+ attributes:
23
+ label: Alternatives and semantic impact
24
+ description: What workarounds exist, and could this affect SLO, UNKNOWN, or provenance semantics?
@@ -0,0 +1,36 @@
1
+ ## What changed?
2
+
3
+ ## Why?
4
+
5
+ ## Alternatives considered
6
+
7
+ ## Compatibility implications
8
+
9
+ <!-- See docs/COMPATIBILITY.md. Does this change any public API,
10
+ telemetry contract, or documented semantics? -->
11
+
12
+ ## Security implications
13
+
14
+ <!-- See docs/SECURITY_MODEL.md if this touches input handling,
15
+ serialization, metadata, or external I/O. -->
16
+
17
+ ## Performance implications
18
+
19
+ <!-- See docs/ENGINEERING_PRINCIPLES.md #6 if this touches a hot path. -->
20
+
21
+ ## How was this verified?
22
+
23
+ - [ ] `ruff check .`
24
+ - [ ] `ruff format --check .`
25
+ - [ ] `mypy src`
26
+ - [ ] `pytest`
27
+ - [ ] `python -m build`
28
+ - [ ] `python scripts/verify_release_artifacts.py` (release-affecting changes)
29
+
30
+ ## Checklist
31
+
32
+ - [ ] Tests added/updated in the correct category (see [docs/TESTING_STRATEGY.md](../docs/TESTING_STRATEGY.md))
33
+ - [ ] Docs updated if semantics changed
34
+ - [ ] Stable API/semantic changes include compatibility-test updates
35
+ - [ ] Privacy and failure-isolation tests updated when a trust boundary changed
36
+ - [ ] ADR added if this is a hard-to-reverse architectural decision (see [docs/adr/README.md](../docs/adr/README.md))
@@ -0,0 +1,84 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ concurrency:
13
+ group: ci-${{ github.workflow }}-${{ github.ref }}
14
+ cancel-in-progress: true
15
+
16
+ jobs:
17
+ quality:
18
+ name: Lint, format, and type-check
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23
+
24
+ - name: Set up Python 3.11
25
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
26
+ with:
27
+ python-version: "3.11"
28
+ cache: "pip"
29
+
30
+ - name: Install package with dev dependencies
31
+ run: python -m pip install -e ".[dev]"
32
+
33
+ - name: Lint (ruff check)
34
+ run: ruff check .
35
+
36
+ - name: Format check (ruff format)
37
+ run: ruff format --check .
38
+
39
+ - name: Type check (mypy)
40
+ run: mypy src
41
+
42
+ test:
43
+ name: Test stable contracts (py${{ matrix.python-version }})
44
+ runs-on: ubuntu-latest
45
+ strategy:
46
+ fail-fast: false
47
+ matrix:
48
+ python-version: ["3.11", "3.12", "3.13"]
49
+ steps:
50
+ - name: Checkout
51
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
52
+
53
+ - name: Set up Python ${{ matrix.python-version }}
54
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
55
+ with:
56
+ python-version: ${{ matrix.python-version }}
57
+ cache: "pip"
58
+
59
+ - name: Install package with test dependencies
60
+ run: python -m pip install -e ".[dev,otel-test]"
61
+
62
+ - name: Test with branch coverage
63
+ run: python -m pytest --cov --cov-report=term-missing
64
+
65
+ artifacts:
66
+ name: Release artifacts, extras, examples, and typing
67
+ runs-on: ubuntu-latest
68
+ steps:
69
+ - name: Checkout
70
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
71
+
72
+ - name: Set up Python 3.11
73
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
74
+ with:
75
+ python-version: "3.11"
76
+ cache: "pip"
77
+
78
+ - name: Build wheel and sdist
79
+ run: |
80
+ python -m pip install build
81
+ python -m build
82
+
83
+ - name: Verify distributed artifacts
84
+ run: python scripts/verify_release_artifacts.py
@@ -0,0 +1,100 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*.*.*"]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ concurrency:
11
+ group: release-${{ github.ref }}
12
+ cancel-in-progress: false
13
+
14
+ jobs:
15
+ build:
16
+ name: Build and verify release artifacts
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout
20
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21
+
22
+ - name: Set up Python 3.11
23
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
24
+ with:
25
+ python-version: "3.11"
26
+ cache: "pip"
27
+
28
+ - name: Confirm tag matches package version
29
+ run: |
30
+ tag="${GITHUB_REF_NAME#v}"
31
+ version="$(python -c 'import re,pathlib; print(re.search(r"__version__ = \"([^\"]+)\"", pathlib.Path("src/agent_reliability/__init__.py").read_text()).group(1))')"
32
+ if [ "$tag" != "$version" ]; then
33
+ echo "Tag v$tag does not match agent_reliability.__version__ ($version)" >&2
34
+ exit 1
35
+ fi
36
+
37
+ - name: Install package and build tooling
38
+ run: python -m pip install -e ".[dev,otel-test]" build
39
+
40
+ - name: Full quality gates
41
+ run: |
42
+ ruff check .
43
+ ruff format --check .
44
+ mypy src
45
+ python -m pytest --cov --cov-report=term-missing
46
+
47
+ - name: Build sdist and wheel
48
+ run: python -m build
49
+
50
+ - name: Verify distributed artifacts
51
+ run: python scripts/verify_release_artifacts.py
52
+
53
+ - name: Upload build artifacts
54
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
55
+ with:
56
+ name: dist
57
+ path: dist/
58
+ if-no-files-found: error
59
+
60
+ publish:
61
+ name: Publish to PyPI
62
+ needs: build
63
+ runs-on: ubuntu-latest
64
+ environment:
65
+ name: pypi
66
+ url: https://pypi.org/project/agent-reliability/
67
+ permissions:
68
+ id-token: write
69
+ steps:
70
+ - name: Download build artifacts
71
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
72
+ with:
73
+ name: dist
74
+ path: dist/
75
+
76
+ - name: Publish to PyPI via Trusted Publishing
77
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
78
+
79
+ github-release:
80
+ name: Create GitHub release
81
+ needs: publish
82
+ runs-on: ubuntu-latest
83
+ permissions:
84
+ contents: write
85
+ steps:
86
+ - name: Download build artifacts
87
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
88
+ with:
89
+ name: dist
90
+ path: dist/
91
+
92
+ - name: Create GitHub release
93
+ env:
94
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95
+ run: |
96
+ gh release create "${GITHUB_REF_NAME}" dist/* \
97
+ --repo "${GITHUB_REPOSITORY}" \
98
+ --title "${GITHUB_REF_NAME}" \
99
+ --prerelease \
100
+ --generate-notes
@@ -0,0 +1,24 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .eggs/
6
+ build/
7
+ dist/
8
+ .venv/
9
+ venv/
10
+
11
+ # Test / coverage / type-check caches
12
+ .pytest_cache/
13
+ .mypy_cache/
14
+ .ruff_cache/
15
+ .hypothesis/
16
+ .coverage
17
+ .coverage.*
18
+ htmlcov/
19
+
20
+ # Editors / OS
21
+ .vscode/
22
+ .idea/
23
+ .DS_Store
24
+ Thumbs.db
@@ -0,0 +1,148 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. Format loosely
4
+ follows [Keep a Changelog](https://keepachangelog.com/); versioning
5
+ follows [docs/COMPATIBILITY.md](docs/COMPATIBILITY.md).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [1.0.0rc1]
10
+
11
+ This first public release candidate establishes the frozen 1.0 contracts for
12
+ privacy-first agent instrumentation, synchronous and asynchronous run
13
+ lifecycles, instrumentation failure isolation, optional OpenTelemetry
14
+ interoperability, deterministic evaluation with provenance, exact SLO/error
15
+ budget/burn-rate mathematics, provenance-safe local reliability aggregation,
16
+ and a typed zero-base-dependency API.
17
+
18
+ ### Changed
19
+
20
+ - M7 freezes the 1.0 public and semantic contracts, defines SemVer and
21
+ deprecation policy, makes runtime `__version__` the package-metadata source,
22
+ and excludes retained exceptions from `SdkDiagnostic` representations.
23
+
24
+ - M6 reframes the developer path around an executable quickstart, core
25
+ concepts, framework-neutral integration guidance, and a product-first
26
+ README. Public API review found no rename or semantic change necessary.
27
+
28
+ - M5 makes evaluator provenance operational: local aggregation fails closed
29
+ with a typed, number-free conflict when indicator or methodology cohorts do
30
+ not match. M1 remains the sole source of reliability mathematics.
31
+
32
+ - M4 extends `EvaluationRecorded` additively with optional immutable evaluator
33
+ provenance and a bounded reason code. Existing `RunHandle.record(...)`
34
+ remains a manual assertion and emits `provenance=None`.
35
+ - Evaluator execution failure is now explicitly distinct from
36
+ `EvaluationOutcome.UNKNOWN`; safe execution never converts evaluator failure
37
+ into agent `FAIL` or `UNKNOWN`.
38
+
39
+ - M3 OpenTelemetry interoperability adds an optional API-only trace-context
40
+ bridge while preserving the M2.1 default path and failure isolation. The
41
+ host owns provider, sampling, propagation, processing, and export.
42
+ - Agent run spans use a privacy allowlist, the constant `invoke_agent` name,
43
+ and versioned Experimental `agent_reliability.*` attributes. Evaluations
44
+ remain vendor-neutral events while OTel's log-based Events APIs mature.
45
+
46
+ - M2.1 runtime hardening: clock, run-ID, and internal run-start failures
47
+ now enter a no-telemetry degraded mode so sync/async application bodies
48
+ still execute. Degraded handles expose no fabricated IDs, valid
49
+ `record()` calls are no-ops, and no lifecycle/evaluation events are emitted.
50
+ This supersedes ADR-0004's original "clock/id-generator failure at
51
+ `__enter__`/`__aenter__` may raise" sub-rule (that behavior turned out
52
+ to prevent the application body from running at all, contradicting the
53
+ ADR's own safety requirement) — see the new ADR-0005, which is now the
54
+ authority on this boundary; ADR-0004's Status was changed to
55
+ "Superseded by ADR-0005" and its original text left otherwise unedited,
56
+ per the project's own ADR process.
57
+ - The default diagnostic logger now emits only sanitized structural
58
+ metadata and the exception class name; it never renders exception
59
+ messages, arguments, representations, or tracebacks (also ADR-0005).
60
+ - `AgentReliability(...)` now validates at construction that any
61
+ supplied `sink`/`clock`/`run_id_generator`/`diagnostic_handler`
62
+ structurally implements its port, raising `TypeError` immediately for
63
+ a wrong object type, rather than failing later and less clearly.
64
+ - Clarified `EventSink` ordering, concurrency, exception, and lifecycle
65
+ contracts; confirmed `CompositeEventSink` attempts all children and
66
+ raises the first child `Exception` after fan-out.
67
+ - Explicitly classified `InMemoryEventSink` as an unbounded-retention
68
+ test/local-inspection utility unsuitable for production.
69
+
70
+ ### Added
71
+
72
+ - M7 adds public API/enum/signature compatibility tests, GA semantic and
73
+ privacy golden tests, wheel-and-sdist release verification, supported-Python
74
+ CI gates, and maintainer release/readiness documentation.
75
+
76
+ - M6 adds four contract-tested examples, clean installed-wheel/base/OTel-extra
77
+ verification in CI, lightweight public issue templates, and the PEP 561
78
+ `py.typed` marker. Base runtime dependencies remain empty.
79
+
80
+ - M5 local reliability engine:
81
+ - immutable observation, cohort, conflict, and report values in
82
+ `agent_reliability.reliability`;
83
+ - pure `evaluate_reliability(...)` with explicit UNKNOWN policy and optional
84
+ explicit burn-rate lookback;
85
+ - exact M1-composed ratio, SLO, error-budget, and burn-rate results;
86
+ - ADR-0008, `docs/LOCAL_RELIABILITY_ENGINE.md`, property/contract tests, and
87
+ aggregation benchmarks;
88
+ - no runtime dependency, I/O, persistence, logging, clock, registry,
89
+ framework coupling, or commercial-platform coupling.
90
+
91
+ - M4 evaluator framework:
92
+ - public `agent_reliability.evaluation` identity, decision, provenance,
93
+ result, execution-failure, sync/async protocol, equality, and predicate
94
+ types;
95
+ - SDK `EvaluatorRunner` with explicit sync/async methods, injected clock, and
96
+ existing sanitized diagnostics;
97
+ - `RunHandle.record_evaluation(...)` for associating completed attributable
98
+ results with a run;
99
+ - `docs/EVALUATOR_FRAMEWORK.md`, `docs/EVALUATION_PROVENANCE.md`, and
100
+ ADR-0007;
101
+ - no new runtime dependency, provider/framework coupling, input capture,
102
+ registry, timeout system, or OTel evaluation mapping.
103
+
104
+ - M3 `RunContextBridge`/`RunContextScope`, optional
105
+ `OpenTelemetryRunContextBridge`, ADR-0006, `docs/OTEL_MAPPING.md`, real OTel
106
+ context/parentage/failure tests, and comparison benchmarks.
107
+
108
+ - Milestone M2: the Python instrumentation SDK, under
109
+ `agent_reliability.sdk` (not the package root), plus new
110
+ `agent_reliability.ports`/`agent_reliability.adapters` runtime types:
111
+ - `sdk`: `AgentReliability`, `RunHandle`, `current_run()`,
112
+ `DiagnosticHandler`/`LoggingDiagnosticHandler`/`SdkDiagnostic`
113
+ - `ports`: `Clock`, `RunIdGenerator`, `EventSink`,
114
+ `RunStarted`/`RunCompleted`/`RunFailed`/`EvaluationRecorded`/`InstrumentationEvent`
115
+ - `adapters`: `SystemClock`, `UuidRunIdGenerator`, `NoOpEventSink`,
116
+ `InMemoryEventSink`, `CompositeEventSink`
117
+ - ADR-0003 (SDK runtime/context architecture) and ADR-0004
118
+ (instrumentation failure isolation) — the latter defines the exact
119
+ rule for what raises and what is suppressed, applied consistently
120
+ across the SDK.
121
+ - `benchmarks/bench_sdk.py`: the first milestone with a real runtime
122
+ path to measure (engineering baselines only, not marketing claims).
123
+ - No M1 (`agent_reliability.domain`) code was modified. No new
124
+ runtime dependencies (standard library only).
125
+
126
+ - Milestone M1: the reliability domain kernel, under
127
+ `agent_reliability.domain` (not the package root). Pure, typed,
128
+ deterministic, zero I/O:
129
+ - `EvaluationOutcome` (`PASS`/`FAIL`/`UNKNOWN`)
130
+ - `AgentIdentity`
131
+ - `AgentRun`, `RunStatus` (minimal four-state lifecycle)
132
+ - `UnknownPolicy`, `ObservationCounts`, `RatioResult`, `compute_ratio`
133
+ - `ObjectiveDirection`, `Slo`, `SloStatus`, `SloEvaluation`, `evaluate_slo`
134
+ - `BudgetStatus`, `ErrorBudget`, `BurnRate`, `compute_error_budget`,
135
+ `compute_burn_rate`
136
+ - ADR-0002 resolves the ratio-math and undefined-data semantics this
137
+ kernel implements, correcting an ambiguity found in the M0
138
+ `SLO_SEMANTICS.md` draft. All public symbols remain pre-alpha with
139
+ no compatibility guarantee (see `docs/COMPATIBILITY.md`).
140
+
141
+ - Repository foundation (milestone M0): engineering principles,
142
+ architecture and domain-model specifications, telemetry contract
143
+ approach, SLO/error-budget/burn-rate mathematics specification,
144
+ security threat model, testing strategy, ADR process
145
+ (ADR-0001: architecture and dependency boundaries), and CI.
146
+ - `agent_reliability` package skeleton: layered `domain` / `application`
147
+ / `ports` / `adapters` / `experimental` structure, all currently
148
+ empty placeholders. Public API is limited to `__version__`.
@@ -0,0 +1,38 @@
1
+ # Code of Conduct
2
+
3
+ ## Our pledge
4
+
5
+ We want participation in this project to be a harassment-free experience
6
+ for everyone, regardless of age, body size, disability, ethnicity,
7
+ gender identity and expression, level of experience, nationality,
8
+ personal appearance, race, religion, or sexual identity and orientation.
9
+
10
+ ## Our standards
11
+
12
+ Examples of behavior that contributes to a positive environment:
13
+
14
+ - Being respectful of differing viewpoints and experiences
15
+ - Giving and gracefully accepting constructive feedback
16
+ - Focusing on what is best for the project and its users
17
+
18
+ Examples of unacceptable behavior:
19
+
20
+ - Harassment, insults, or derogatory comments, public or private
21
+ - Publishing others' private information without explicit permission
22
+ - Other conduct which could reasonably be considered inappropriate in a
23
+ professional setting
24
+
25
+ ## Enforcement
26
+
27
+ Instances of unacceptable behavior may be reported to the project
28
+ maintainers through the reporting channel described in
29
+ [SECURITY.md](SECURITY.md) (for reports where privacy matters) or via a
30
+ public issue for less sensitive concerns. Maintainers are responsible
31
+ for clarifying standards and are expected to take appropriate, fair
32
+ corrective action in response to any behavior they deem inappropriate.
33
+
34
+ ## Scope
35
+
36
+ This Code of Conduct applies within all project spaces (issues, pull
37
+ requests, discussions) and when an individual is representing the
38
+ project in public spaces.
@@ -0,0 +1,62 @@
1
+ # Contributing
2
+
3
+ Thank you for your interest. Agent Reliability is pre-GA. Core semantics are
4
+ substantially complete; public APIs may receive limited refinement before
5
+ `1.0.0`. Questions and precise critique remain welcome.
6
+
7
+ ## Development setup
8
+
9
+ Requires Python 3.11–3.13.
10
+
11
+ ```bash
12
+ python -m venv .venv
13
+ # POSIX: source .venv/bin/activate
14
+ # Windows PowerShell: .venv\Scripts\Activate.ps1
15
+ python -m pip install -e ".[dev]"
16
+ ```
17
+
18
+ Branches use `<type>/<short-description>`, for example
19
+ `fix/burn-rate-division-by-zero`. Keep commits reviewable and do not mix
20
+ unrelated semantic and formatting changes.
21
+
22
+ ## Before opening a PR
23
+
24
+ ```bash
25
+ ruff check .
26
+ ruff format --check .
27
+ mypy src
28
+ pytest --cov --cov-report=term-missing
29
+ python -m build
30
+ python scripts/verify_release_artifacts.py
31
+ ```
32
+
33
+ CI repeats these checks. New behavior needs the appropriate unit, property,
34
+ contract, or integration tests; see [testing strategy](docs/TESTING_STRATEGY.md).
35
+ Reliability mathematics changes require invariant/property coverage.
36
+
37
+ ## Architecture and documentation
38
+
39
+ Preserve the dependency direction and anti-goals in
40
+ [architecture](docs/ARCHITECTURE.md) and
41
+ [engineering principles](docs/ENGINEERING_PRINCIPLES.md). Do not add provider,
42
+ agent-framework, storage, or transport dependencies to the domain.
43
+
44
+ Hard-to-reverse decisions require an ADR alongside the implementation; see the
45
+ [ADR guide](docs/adr/README.md). Update documentation in the same PR whenever
46
+ public behavior or semantics change.
47
+
48
+ ## Compatibility
49
+
50
+ Before 1.0, public APIs may receive limited breaking refinement. See
51
+ [compatibility](docs/COMPATIBILITY.md). Do not introduce convenience APIs that
52
+ hide evaluator methodology, UNKNOWN policy, provenance, or SLO choices.
53
+
54
+ ## PR description checklist
55
+
56
+ - What changed and why?
57
+ - What alternatives were considered?
58
+ - What are the compatibility, security, and performance implications?
59
+ - How was it verified?
60
+
61
+ Security vulnerabilities must use the private process in [SECURITY.md](SECURITY.md),
62
+ not a public issue.