Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ Public data formats for the standalone Genesis Code Intelligence product. The so
## Contents

- `schemas/v0.1.0/analysis-response.schema.json`: stable, user-readable Markdown/JSON report contract.
- `schemas/v0.2.0/analysis-response.schema.json`: opt-in report with source-backed business behavior comparisons; all v0.1.0 report fields remain.
- `schemas/v0.1.0/flows.schema.json`: machine-readable `.genesis/flows.yaml` contract.
- `specs/flows-yaml.md`: lifecycle and field semantics.
- `examples/v0.1.0/`: small, synthetic examples with no customer source.
- `examples/v0.2.0/behavior-comparison.json`: synthetic notification/wait comparison, including an explicitly incomplete scope.
- `specs/behavior-comparison.md`: scenario, side-specific evidence, coverage and version handling.

The four reports demonstrate a complete result, unresolved dynamic call, missing intent/tests, and stale flow entry. They are protocol examples, not evidence of analyzer accuracy.

Expand Down
4 changes: 3 additions & 1 deletion docs/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

The public report JSON Schema uses semantic version strings in `schema_version`. The `.genesis/flows.yaml` format uses an integer `schema_version` because its format evolves independently. The private CLI-to-service `protocol_version` is maintained in the implementation repository and is not implied by either public format.

The private Pydantic models are the sole source of generated schemas. Changes to a public model require regenerated schemas and example validation in the same change. Changes to internal request/response models require updating the private protocol notes and fixed fixtures. The first implementation accepts an exact version match; compatibility negotiation is deferred until there is a released client and service.
The private Pydantic models are the sole source of generated schemas. Changes to a public model require regenerated schemas and example validation in the same change. Changes to internal request/response models require updating the private protocol notes and fixed fixtures.

Report v0.1.0 is retained unchanged. A report with a structured `behavior_review` uses v0.2.0, preserving every original report field. Consumers must dispatch on `schema_version` and validate against that exact version; do not feed v0.2.0 into the strict v0.1.0 schema. The implementation's `parse_analysis_response()` accepts both. Flow files still use schema 1. The private HTTP protocol negotiates optional behavior features independently; an older client continues to receive the legacy report content. Public schemas describe report artifacts, not wire service requests.
335 changes: 335 additions & 0 deletions examples/v0.2.0/behavior-comparison.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,335 @@
{
"schema_version": "0.2.0",
"snapshot_id": "sha256:348c1be73023373ed0e1804deaf4efb2933ec349da1c0c9dd295457a56e7f83d",
"analysis_status": "partial",
"section_status": {
"behavior_intent": {
"status": "analyzed",
"reason": null,
"analyzed_scope": "Synthetic submit_report example only"
},
"flow_impact": {
"status": "analyzed",
"reason": null,
"analyzed_scope": "Synthetic submit_report example only"
},
"cost_risk": {
"status": "analyzed",
"reason": null,
"analyzed_scope": "Synthetic submit_report example only"
},
"acceptance_tests": {
"status": "analyzed",
"reason": null,
"analyzed_scope": "Synthetic submit_report example only"
},
"verification": {
"status": "analyzed",
"reason": null,
"analyzed_scope": "Synthetic submit_report example only"
}
},
"scope": {
"base_revision": "fixture-normal-five-sections-base",
"head_revision": "fixture-normal-five-sections-head",
"analyzed_files": [
".genesis/flows.yaml",
"intent/pr.md",
"intent/task.md",
"src/app.py",
"tests/test_submit.py"
],
"omitted_inputs": [],
"parser_limitations": [
"Deterministic fixture facts; no customer code was analyzed."
],
"execution_mode": "mock"
},
"findings": [
{
"finding_id": "F-RULE-WAIT",
"category": "cost_risk",
"statement": "An awaited operation was added before returning; actual added wait is unknown.",
"severity": "low",
"basis": [
"code_fact"
],
"evidence_ids": [
"ev_89e203f9043afb89b9068091",
"ev_6df63ca95d3cb58b96f6d1f7"
],
"deviation": null,
"condition": null,
"gap": null,
"recommendation": null,
"flow_ids": [],
"estimate_ids": [
"wait-1"
]
},
{
"finding_id": "F-SEM-BEHAVIOR",
"category": "behavior_intent",
"statement": "The head function awaits notify(result) before returning; the base function returns submission directly.",
"severity": "info",
"basis": [
"code_fact"
],
"evidence_ids": [
"ev_89e203f9043afb89b9068091",
"ev_6df63ca95d3cb58b96f6d1f7"
],
"deviation": null,
"condition": null,
"gap": null,
"recommendation": null,
"flow_ids": [],
"estimate_ids": []
},
{
"finding_id": "F-SEM-CLAIM",
"category": "behavior_intent",
"statement": "No success-value check appears before notify in the visible function. If submit returns a failure value instead of raising, the PR's claim is unverified.",
"severity": "medium",
"basis": [
"code_fact",
"user_intent",
"agent_claim",
"semantic_inference"
],
"evidence_ids": [
"ev_6df63ca95d3cb58b96f6d1f7",
"ev_1e751d22d466cffdc5bcb9c1",
"ev_5dd9203ab8839a14297b8fa5"
],
"deviation": "unverified_claim",
"condition": "Only when submit returns a failure value; exceptions prevent the following notify call.",
"gap": null,
"recommendation": null,
"flow_ids": [],
"estimate_ids": []
},
{
"finding_id": "F-SEM-TEST",
"category": "acceptance_tests",
"statement": "The supplied test checks a non-null result; it contains no assertion about notification on failure.",
"severity": "low",
"basis": [
"code_fact",
"user_intent"
],
"evidence_ids": [
"ev_6faad0b1bdfff9c9b6261e4d",
"ev_1e751d22d466cffdc5bcb9c1"
],
"deviation": null,
"condition": null,
"gap": null,
"recommendation": null,
"flow_ids": [
"submit-report"
],
"estimate_ids": []
}
],
"estimates": [
{
"estimate_id": "wait-1",
"flow_ids": [],
"structural_signals": [
"One additional serial await"
],
"parameters": [
{
"name": "added_wait",
"value": null,
"unit": "ms",
"source": null,
"unknown_reason": "No runtime measurements or external implementation supplied"
}
],
"formula": null,
"amount": null,
"currency": null,
"price_source": null,
"price_date": null,
"assumptions": [],
"unknowns": [
"Actual latency and failure rate"
],
"evidence_ids": [
"ev_89e203f9043afb89b9068091",
"ev_6df63ca95d3cb58b96f6d1f7"
]
}
],
"suggestions": [
{
"suggestion_id": "V-001",
"scenario": "Review the new awaited operation's failure behavior.",
"conditions": [
"Submission returns a failure value",
"Submission raises an exception"
],
"suggested_assertions": [
"No success notification is sent on a failure-valued submission"
],
"existing_test_evidence_ids": [
"ev_6faad0b1bdfff9c9b6261e4d"
],
"rationale": "Distinguish return-value failures from exceptions; test definitions are not executed.",
"questions_for_user": [
"Which values mean submission failed?",
"Should an awaited operation's failure change the return behavior?"
],
"evidence_ids": [
"ev_6df63ca95d3cb58b96f6d1f7"
]
}
],
"limitations": [
{
"code": "mock_fixture",
"message": "Synthetic contract example, not a customer analysis.",
"evidence_ids": [],
"affects_completeness": false
}
],
"analyzer_version": "0.1.0-mock",
"rule_version": "0.1.0-mock",
"semantic_version": "mock-v1",
"evidence": [
{
"evidence_id": "ev_89e203f9043afb89b9068091",
"snapshot_id": "sha256:348c1be73023373ed0e1804deaf4efb2933ec349da1c0c9dd295457a56e7f83d",
"side": "base",
"path": "src/app.py",
"range": {
"start_line": 1,
"end_line": 2,
"start_column": null,
"end_column": null
},
"snippet_digest": "sha256:37b82a7da7a16b0788e23b4481e4f79fdac7b17ecaf2e99cb643878a0178751e",
"kind": "code"
},
{
"evidence_id": "ev_6df63ca95d3cb58b96f6d1f7",
"snapshot_id": "sha256:348c1be73023373ed0e1804deaf4efb2933ec349da1c0c9dd295457a56e7f83d",
"side": "head",
"path": "src/app.py",
"range": {
"start_line": 1,
"end_line": 4,
"start_column": null,
"end_column": null
},
"snippet_digest": "sha256:bfb2ed982e86a11e90c1e514342e5378eaac2b75437d1c6332fb9cc990b5ace7",
"kind": "code"
},
{
"evidence_id": "ev_17747a64e05ffff55266df1b",
"snapshot_id": "sha256:348c1be73023373ed0e1804deaf4efb2933ec349da1c0c9dd295457a56e7f83d",
"side": "base",
"path": ".genesis/flows.yaml",
"range": {
"start_line": 1,
"end_line": 9,
"start_column": null,
"end_column": null
},
"snippet_digest": "sha256:04a254461546fece9246c49f90901dce5e7407b985dbb599a05f9d3aca706f3e",
"kind": "flow"
},
{
"evidence_id": "ev_afc8b812c5a4c2486e9283c2",
"snapshot_id": "sha256:348c1be73023373ed0e1804deaf4efb2933ec349da1c0c9dd295457a56e7f83d",
"side": "head",
"path": ".genesis/flows.yaml",
"range": {
"start_line": 1,
"end_line": 9,
"start_column": null,
"end_column": null
},
"snippet_digest": "sha256:04a254461546fece9246c49f90901dce5e7407b985dbb599a05f9d3aca706f3e",
"kind": "flow"
},
{
"evidence_id": "ev_5dd9203ab8839a14297b8fa5",
"snapshot_id": "sha256:348c1be73023373ed0e1804deaf4efb2933ec349da1c0c9dd295457a56e7f83d",
"side": "head",
"path": "intent/pr.md",
"range": {
"start_line": 1,
"end_line": 1,
"start_column": null,
"end_column": null
},
"snippet_digest": "sha256:9929b358104171c1c3c15fa719949cc0fa90baa9dc76a3aca2a807f486ad2084",
"kind": "intent"
},
{
"evidence_id": "ev_1e751d22d466cffdc5bcb9c1",
"snapshot_id": "sha256:348c1be73023373ed0e1804deaf4efb2933ec349da1c0c9dd295457a56e7f83d",
"side": "head",
"path": "intent/task.md",
"range": {
"start_line": 1,
"end_line": 1,
"start_column": null,
"end_column": null
},
"snippet_digest": "sha256:4a4c4ab25ce9fae85ba0e59458dedadb0d3329f785da9fbc875538ff1a4cb5b9",
"kind": "intent"
},
{
"evidence_id": "ev_6faad0b1bdfff9c9b6261e4d",
"snapshot_id": "sha256:348c1be73023373ed0e1804deaf4efb2933ec349da1c0c9dd295457a56e7f83d",
"side": "head",
"path": "tests/test_submit.py",
"range": {
"start_line": 1,
"end_line": 3,
"start_column": null,
"end_column": null
},
"snippet_digest": "sha256:ff9704d3f8a48bd8fe000b634911b152aea5abf8870bb8b8317e9a090b20fba4",
"kind": "test"
}
],
"behavior_review": {
"version": "1",
"coverage": {
"status": "insufficient_context",
"reason": "Synthetic example; caller and notification implementation are absent.",
"analyzed_scope": null
},
"changes": [
{
"change_id": "report-notification",
"scenario": "提交报告并通知",
"condition": "按各版本的调用方式执行 submit_report,第三方提交返回结果。",
"before": "直接返回第三方提交结果。",
"after": "等待通知完成后才返回提交结果;函数现在需要异步调用。",
"before_evidence_ids": [
"ev_89e203f9043afb89b9068091"
],
"after_evidence_ids": [
"ev_6df63ca95d3cb58b96f6d1f7"
],
"explanation": "新增 await notify(result),放在提交与返回之间。",
"impact": "完成时间包含通知等待;若通知抛出异常,当前函数不会正常返回结果。",
"preserved_behavior": "第三方提交调用仍是同步调用。",
"evidence_ids": [
"ev_89e203f9043afb89b9068091",
"ev_6df63ca95d3cb58b96f6d1f7"
],
"finding_ids": [],
"limitations": [
"未提供调用方及通知实现,无法确认调用方适配、通知耗时及失败概率。"
]
}
]
}
}
Loading
Loading