circa-ci 0.2.2__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 (39) hide show
  1. circa_ci-0.2.2/.gitignore +29 -0
  2. circa_ci-0.2.2/CHANGELOG.md +187 -0
  3. circa_ci-0.2.2/CONTRIBUTING.md +99 -0
  4. circa_ci-0.2.2/LICENSE +201 -0
  5. circa_ci-0.2.2/PKG-INFO +781 -0
  6. circa_ci-0.2.2/README.md +752 -0
  7. circa_ci-0.2.2/SECURITY.md +102 -0
  8. circa_ci-0.2.2/examples/demo_disk_full.log +5 -0
  9. circa_ci-0.2.2/examples/demo_insufficient_evidence.log +4 -0
  10. circa_ci-0.2.2/examples/demo_performance_threshold.log +5 -0
  11. circa_ci-0.2.2/examples/demo_unknown_failure.log +5 -0
  12. circa_ci-0.2.2/examples/hardware_failure.json +7 -0
  13. circa_ci-0.2.2/examples/hardware_failure.log +5 -0
  14. circa_ci-0.2.2/examples/incident_draft.json +22 -0
  15. circa_ci-0.2.2/pyproject.toml +85 -0
  16. circa_ci-0.2.2/src/circa/__init__.py +0 -0
  17. circa_ci-0.2.2/src/circa/analyzer.py +405 -0
  18. circa_ci-0.2.2/src/circa/benchmark.py +226 -0
  19. circa_ci-0.2.2/src/circa/cli.py +985 -0
  20. circa_ci-0.2.2/src/circa/data/incidents.json +82 -0
  21. circa_ci-0.2.2/src/circa/data/retrieval_evaluation.json +285 -0
  22. circa_ci-0.2.2/src/circa/doctor.py +111 -0
  23. circa_ci-0.2.2/src/circa/evaluation.py +282 -0
  24. circa_ci-0.2.2/src/circa/fingerprint.py +82 -0
  25. circa_ci-0.2.2/src/circa/github_runs.py +281 -0
  26. circa_ci-0.2.2/src/circa/hybrid.py +35 -0
  27. circa_ci-0.2.2/src/circa/knowledge.py +117 -0
  28. circa_ci-0.2.2/src/circa/knowledge_store.py +328 -0
  29. circa_ci-0.2.2/src/circa/llm.py +194 -0
  30. circa_ci-0.2.2/src/circa/log_parser.py +119 -0
  31. circa_ci-0.2.2/src/circa/models.py +256 -0
  32. circa_ci-0.2.2/src/circa/performance.py +172 -0
  33. circa_ci-0.2.2/src/circa/pipeline.py +342 -0
  34. circa_ci-0.2.2/src/circa/prompts.py +82 -0
  35. circa_ci-0.2.2/src/circa/redaction.py +109 -0
  36. circa_ci-0.2.2/src/circa/report.py +0 -0
  37. circa_ci-0.2.2/src/circa/resources.py +13 -0
  38. circa_ci-0.2.2/src/circa/retrieval.py +74 -0
  39. circa_ci-0.2.2/src/circa/semantic.py +130 -0
@@ -0,0 +1,29 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.so
5
+ .Python
6
+ .venv/
7
+ venv/
8
+ env/
9
+
10
+ # Tooling
11
+ .pytest_cache/
12
+ .mypy_cache/
13
+ .ruff_cache/
14
+ .coverage
15
+ coverage.xml
16
+ htmlcov/
17
+
18
+ # Packaging
19
+ build/
20
+ dist/
21
+ *.egg-info/
22
+
23
+ # Editors and OS
24
+ .DS_Store
25
+ .idea/
26
+ .vscode/
27
+
28
+ # Local real-log pilots (never commit real logs)
29
+ pilot/
@@ -0,0 +1,187 @@
1
+ # Changelog
2
+
3
+ All notable changes to CIRCA are listed here. Versions follow
4
+ [Semantic Versioning](https://semver.org); while CIRCA is below 1.0, a minor
5
+ version may change behavior.
6
+
7
+ ## 0.2.2 — 2026-11-01
8
+
9
+ Packaging only; analysis behavior is unchanged.
10
+
11
+ - Prepared for PyPI as `circa-ci`, because the name `circa` belongs to an
12
+ unrelated project. The command (`circa`) and the import name (`circa`) are
13
+ unchanged. If an earlier version is installed, run `pip uninstall circa`
14
+ before installing 0.2.2; removing it afterwards also removes the `circa`
15
+ command.
16
+ - Added a manually run publishing workflow that uses PyPI trusted publishing
17
+ (no stored API token). It publishes only a tag that matches the package
18
+ version, to TestPyPI or, through the `pypi` environment, to PyPI.
19
+ - The source distribution no longer includes the team knowledge file, tests,
20
+ evaluation dataset, agent instructions, or CI configuration. The build
21
+ backend is pinned.
22
+ - README links to CONTRIBUTING, SECURITY, and CHANGELOG are absolute, so they
23
+ work on the PyPI project page.
24
+
25
+ ## 0.2.1 — 2026-11-01
26
+
27
+ ### Security
28
+
29
+ - Fixed partial redaction of URL passwords that contain `@`. In v0.2.0,
30
+ `https://deploy:pass@word@host/` became `https://deploy:[REDACTED]@word@host/`,
31
+ leaving the part of the password after its first `@` in analysis,
32
+ fingerprints, LLM prompts, terminal and JSON output, and `pending_review`
33
+ drafts that `investigate-log` saved to a knowledge file. The whole password is
34
+ now redacted, up to the last `@` before the host. URL passwords without `@`
35
+ were fully redacted in v0.2.0 too.
36
+ - Output already produced by v0.2.0 is not repaired automatically. If a CI log
37
+ you processed with v0.2.0 had a URL password containing `@`, treat that
38
+ password as exposed and rotate it. To find saved drafts with a leftover, run
39
+ `grep -cE '\[REDACTED\]@[^ /?#"]*@' path/to/incidents.json` (any count above
40
+ 0), then edit those values to `[REDACTED]` as described in
41
+ [SECURITY.md](SECURITY.md#repairing-a-knowledge-file). Saved reports and
42
+ copied terminal output need the same review.
43
+ - Dedup fingerprints change only for logs that contain such URLs.
44
+
45
+ ## 0.2.0 — 2026-11-01
46
+
47
+ Changes since v0.1.0 (2026-10-22). CIRCA is still local-first: analysis is
48
+ deterministic and works without any AI service, and the only runtime Python
49
+ dependencies are Pydantic and Typer.
50
+
51
+ ### Investigation workflow
52
+
53
+ - New `circa investigate-log` command. It runs the full workflow on one log:
54
+ deterministic analysis, then verified team incidents (a strong match with a
55
+ validated fix is returned as a known solution with no LLM call), then
56
+ already-recorded failures, and only then at most one call to an optional
57
+ local Ollama model.
58
+ - A useful LLM diagnosis is saved as a `pending_review` draft. A draft needs a
59
+ category, a root cause grounded in the log, and at least one quoted log line.
60
+ Suggestions that would weaken a safeguard (disable, skip, bypass, `--force`,
61
+ thresholds, baselines) are left out and named in a note.
62
+ - The deterministic category stays authoritative; the LLM category is used
63
+ only when the analyzer found none, and `draft_origin.category_source` records
64
+ where it came from.
65
+
66
+ ### GitHub Actions
67
+
68
+ - New `circa runs` command lists a repository's recent failed runs through the
69
+ GitHub CLI (`gh`).
70
+ - `investigate-log` accepts a run URL, a run ID (with `--repo` or a detected
71
+ repository), or no source, in which case it lists failed runs and asks you to
72
+ choose one.
73
+ - The repository is detected from the checkout's github.com remotes. CIRCA
74
+ stops instead of guessing when remotes disagree, and never prints remote
75
+ URLs, which can contain credentials. CIRCA never reads the `gh` token.
76
+
77
+ ### Team knowledge and human review
78
+
79
+ - Team incident knowledge lives in a JSON file passed explicitly with
80
+ `--knowledge`, for example `team/incidents.json`.
81
+ - New `circa knowledge` commands: `add`, `update`, `verify`, `reject`,
82
+ `supersede`, `show`, `list`, and `validate`.
83
+ - Lifecycle: `pending_review` → `verified` → `superseded`, or `rejected`. Only
84
+ `verified` incidents are matched. Every write shows the record, asks for
85
+ confirmation (or `--yes`), writes atomically, and refuses if the file changed
86
+ since it was read.
87
+ - A real incident can be verified only with a root cause, a reviewer, and a fix
88
+ validated by a named method with evidence. LLM output and a single
89
+ successful retry never validate a fix.
90
+ - Exact duplicates (same dedup fingerprint) are rejected; near duplicates need
91
+ `--allow-similar`.
92
+
93
+ ### Setup and first-time use
94
+
95
+ - New `circa doctor` (read-only prerequisite checks) and `circa init` (creates
96
+ an empty knowledge file only if it does not exist).
97
+ - New `circa --version`.
98
+ - Rewritten README with a quick start, tutorial, and troubleshooting table.
99
+
100
+ ### Deterministic analysis
101
+
102
+ - Performance-threshold assessment for logs with an explicit threshold
103
+ violation. It reports a candidate cause as a hypothesis, never changes
104
+ thresholds, and does not change the category.
105
+ - Errors are matched line by line in pipeline-stage order, so the earliest
106
+ failing stage wins. Informational lines and printed source code (diffs,
107
+ Bandit snippets) are not treated as errors.
108
+ - A historical root cause is reused only when its pipeline stage fits the
109
+ failure.
110
+ - Newly recognized failures: `npm ERR!`, Ruff lint and format, Prettier, mypy,
111
+ Bandit findings, C/C++ compiler errors, and Python `SyntaxError`,
112
+ `IndentationError`, and `TabError`. File, line, and rule details are reported
113
+ when the log states them.
114
+
115
+ ### Evaluation
116
+
117
+ - New `circa evaluate` measures deterministic classification and root-cause
118
+ correctness on labeled cases (`evaluation/cases.json`, including sanitized
119
+ real CI logs) plus the 35 legacy benchmark cases. It is read-only and never
120
+ reads team knowledge.
121
+ - On the shipped dataset, category accuracy is 48/60 confirmed cases with no
122
+ false positives; the legacy set stays at 27/35. These numbers describe
123
+ CIRCA's own labeled cases, not production accuracy.
124
+ - The retrieval benchmark (`circa benchmark`) and its synthetic dataset are
125
+ unchanged.
126
+
127
+ ### Security
128
+
129
+ - Credentials are redacted before any processing. Recognized values become
130
+ `[REDACTED]` while the rest of the message is kept. This covers GitHub,
131
+ GitLab, Slack, npm, PyPI, Google, and OpenAI/Anthropic-style tokens; AWS
132
+ access key IDs; JSON Web Tokens; `Authorization` and bearer values; passwords
133
+ in URLs; credential options and assignments (such as `NPM_TOKEN=...`); and PEM
134
+ private keys.
135
+ - Fingerprints, analysis, LLM prompts, drafts, and terminal and JSON output all
136
+ use the redacted text. Fingerprints of logs without credentials are
137
+ unchanged.
138
+ - Redaction fails closed: if it cannot complete, the command stops with a safe
139
+ error before anything reads the log.
140
+ - Credentials in LLM output are redacted and block the draft. Credentials in a
141
+ draft's source name or model setting are redacted.
142
+ - Knowledge records containing a recognized credential are rejected in every
143
+ text field, including `draft_origin.cited_log_lines`. The error names the
144
+ field (for example `evidence[1]`) but never the value.
145
+ - Terminal control sequences in CI logs and GitHub output are removed before
146
+ display. Invalid `circa analyze` input reports field errors without quoting
147
+ values, and tracebacks never show local variables.
148
+ - CI quality gate: Prettier, Ruff, tests on Python 3.12 and 3.13 with a 90%
149
+ coverage floor, mypy, Bandit, pip-audit, Gitleaks, actionlint, zizmor, and a
150
+ wheel install smoke test. Actions are pinned to commit SHAs with read-only
151
+ permissions.
152
+
153
+ ### Upgrade notes
154
+
155
+ - **Knowledge files may need a one-time repair.** Credential detection is
156
+ broader than in v0.1.0, so a team file that loaded before can now fail with
157
+ `incident text matches a secret or credential pattern in <field>`. Replace
158
+ the named value with `[REDACTED]` and run `circa knowledge validate`. See
159
+ [SECURITY.md](SECURITY.md#repairing-a-knowledge-file). Records are never
160
+ changed or deleted automatically.
161
+ - Lines containing credentials are now kept in redacted form instead of being
162
+ dropped from investigation evidence. Dedup fingerprints change only for such
163
+ logs.
164
+ - The redaction placeholder is `[REDACTED]`. Text already masked as `***` or
165
+ `<redacted>` is still accepted.
166
+
167
+ ### Known limitations
168
+
169
+ - Classification is rule- and keyword-based. Failures outside the recognized
170
+ signatures are reported as `unknown`, and only one explicit failure kind is
171
+ named per log.
172
+ - Credential detection is pattern-based, not complete (see
173
+ [SECURITY.md](SECURITY.md)).
174
+ - GitHub support is limited to github.com through the GitHub CLI. GitHub
175
+ Enterprise and other CI systems are not supported.
176
+ - The LLM path needs a local Ollama server; small local models give variable
177
+ hypotheses, which is why every draft requires human review.
178
+ - `circa evaluate` needs a repository checkout; its dataset is not in the
179
+ wheel.
180
+
181
+ ## 0.1.0 — 2026-10-22
182
+
183
+ First release: deterministic failure analysis of structured failures
184
+ (`circa analyze`) and raw logs (`circa analyze-log`), packaged synthetic
185
+ historical incidents, keyword retrieval with optional local semantic retrieval,
186
+ optional local LLM explanation and classification, and the retrieval benchmark
187
+ (`circa benchmark`).
@@ -0,0 +1,99 @@
1
+ # Contributing to CIRCA
2
+
3
+ Thank you for helping improve CIRCA. This guide covers setting up a
4
+ development environment, running the checks CI runs, and what a pull request
5
+ needs.
6
+
7
+ ## Development setup
8
+
9
+ Requirements: Python 3.12 or 3.13, and Git. Node.js (for Prettier) and the
10
+ standalone `actionlint` and `gitleaks` tools are needed only to reproduce every
11
+ CI check locally.
12
+
13
+ ```bash
14
+ git clone https://github.com/scmbuildrelease/CIRCA.git && cd CIRCA
15
+ python3 -m venv .venv && . .venv/bin/activate
16
+ python -m pip install -e ".[dev]"
17
+ circa --version
18
+ ```
19
+
20
+ The `dev` extra installs pytest, pytest-cov, and pinned versions of Ruff and
21
+ mypy. Ollama and the GitHub CLI are not needed for development: tests use fakes
22
+ and never call a model, GitHub, or the network.
23
+
24
+ ## Tests and quality checks
25
+
26
+ Run these before opening a pull request. They match the CI jobs in
27
+ `.github/workflows/ci.yml`.
28
+
29
+ ```bash
30
+ python -m pytest --cov --cov-report=term-missing # fails below 90% coverage
31
+ ruff check .
32
+ ruff format --check .
33
+ mypy
34
+ npx --yes prettier@3.9.9 --check "**/*.{md,yml,yaml,json}"
35
+ pipx run bandit==1.9.4 -c pyproject.toml -r src
36
+ pipx run pip-audit==2.10.1 --strict .
37
+ pipx run zizmor==1.30.1 .github/workflows
38
+ actionlint
39
+ gitleaks git --redact .
40
+ python -m pip install build==1.6.1 && python -m build # sdist and wheel in dist/
41
+ ```
42
+
43
+ CI runs the tests on Python 3.12 and 3.13. CI only reports problems; it never
44
+ formats or fixes files. Run `ruff format .` and
45
+ `npx prettier@3.9.9 --write <files>` yourself.
46
+
47
+ Two read-only regression checks are useful when you change analysis code.
48
+ Report any change in their output in your pull request:
49
+
50
+ ```bash
51
+ circa evaluate # deterministic classification on evaluation/cases.json
52
+ circa benchmark # retrieval on the packaged synthetic dataset
53
+ ```
54
+
55
+ ## Project principles
56
+
57
+ These come from [AGENTS.md](AGENTS.md); please follow them in every change.
58
+
59
+ - **Deterministic analysis is the primary authority.** It must work without any
60
+ LLM. The LLM is optional, local (Ollama), and never replaces or overrides a
61
+ deterministic result.
62
+ - **Keep dependencies minimal.** The runtime depends only on Pydantic and
63
+ Typer. Do not add a dependency, external service, or large framework without
64
+ discussing it in an issue first.
65
+ - **Keep changes small and focused.** Reuse existing code before adding
66
+ abstractions, and change only what the pull request is about.
67
+ - **Add tests for new behavior,** including negative cases (what must _not_ be
68
+ recognized), and run the full suite.
69
+ - **Do not tune rules to evaluation labels.** Add evaluation cases when a real
70
+ failure is understood, not to make a metric go up.
71
+
72
+ ## Data and security rules
73
+
74
+ - **Never commit real credentials, private CI logs, or customer data.** Test
75
+ fixtures use synthetic values. Assemble credential-shaped test strings at
76
+ runtime (for example `"ghp" + "_" + ...`) so Gitleaks does not flag them.
77
+ - **Packaged incidents and evaluation data are read-only and synthetic.** Real
78
+ logs under `evaluation/logs/` must be sanitized.
79
+ - **Do not edit `team/incidents.json` by hand in a feature pull request.**
80
+ Changes to team knowledge go through the `circa knowledge` commands and human
81
+ review.
82
+ - **Never mark a fix `validated` without real validation evidence.** LLM output
83
+ and a single successful retry are not validation.
84
+ - Report vulnerabilities privately as described in [SECURITY.md](SECURITY.md).
85
+
86
+ ## Pull requests
87
+
88
+ - Open an issue first for anything beyond a small fix, so the approach can be
89
+ agreed on.
90
+ - Describe what changed and why, and how you tested it. Include `circa evaluate`
91
+ or `circa benchmark` differences if analysis behavior changed.
92
+ - Keep CLI and JSON output backward compatible unless the change is the point of
93
+ the pull request; call out any change explicitly.
94
+ - Update `README.md` and `CHANGELOG.md` (under the unreleased version) when user
95
+ visible behavior changes.
96
+ - All CI checks must pass before merging.
97
+
98
+ By contributing, you agree that your contribution is licensed under the
99
+ [Apache License 2.0](LICENSE).
circa_ci-0.2.2/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.