Skip to content

Add dashboard release health summary artifact#30

Merged
ProfRandom92 merged 1 commit into
mainfrom
codex/add-dashboard-release-health-summary-artifact
May 11, 2026
Merged

Add dashboard release health summary artifact#30
ProfRandom92 merged 1 commit into
mainfrom
codex/add-dashboard-release-health-summary-artifact

Conversation

@ProfRandom92

Copy link
Copy Markdown
Owner

Motivation

  • Provide a compact, deterministic dashboard-facing release-readiness artifact that summarizes local project health, contract validation, API/export validation, fixture generation, and cross-repo promotion signals without requiring a live server or real Daimler data.
  • Make it easy for future UI/dashboard work to consume a single static JSON (and companion Markdown) artifact for status badges and next-action guidance.

Description

  • Added scripts/generate_dashboard_health_summary.py, a Python 3.11+ stdlib-only generator that inspects report existence and small filesystem metadata and emits deterministic artifacts with generated_at: "2026-01-01T00:00:00Z" and summary_type: "dashboard_release_health".
  • Created generated artifacts docs/reports/dashboard-health-summary.md and docs/reports/dashboard-health-summary.json containing overall_status (red/yellow/green), named checks, required_artifacts_present, missing_artifacts, next_recommended_actions, and safety_notes (no secrets, synthetic data only).
  • Updated CI in .github/workflows/agent-checks.yml to compile and run the generator as part of the agent checks, and updated docs docs/API_SURFACE.md and docs/AGENT_WORKFLOW.md to reference the generator and how dashboards/UI can consume the JSON summary.
  • Status rules implemented: required local artifacts missing => red; required present but optional cross-repo artifacts missing => yellow; all required and optional present => green.

Testing

  • python -m py_compile scripts/generate_dashboard_health_summary.py — passed.
  • python scripts/generate_dashboard_health_summary.py — ran and produced docs/reports/dashboard-health-summary.md and docs/reports/dashboard-health-summary.json (passed).
  • python scripts/run_checks.py — executed successfully as part of validation steps after adding the generator (passed).

Closes #29.


Codex Task

@ProfRandom92 ProfRandom92 merged commit 7182d7c into main May 11, 2026
1 of 2 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a dashboard release health summary system, including a new generation script and corresponding documentation updates. Feedback focuses on improving path consistency across artifact definitions, enhancing type safety by using TypedDict instead of generic dictionaries, and refactoring the status determination logic to be more robust and simplified.

Comment on lines +70 to +95
OPTIONAL_CROSS_REPO_ARTIFACTS = [
Artifact(
"benchmark_summary",
"benchmark-summary.json",
"Optional sanitized benchmark promotion summary from the experiment repository.",
False,
),
Artifact(
"regression_summary",
"regression-summary.json",
"Optional sanitized regression promotion summary from the experiment repository.",
False,
),
Artifact(
"sanitization_summary",
"sanitization-summary.json",
"Optional sanitized data-handling summary from the experiment repository.",
False,
),
Artifact(
"report_contract_validation_report",
"report-contract-validation-report.md",
"Optional report-contract validation evidence from the experiment repository.",
False,
),
]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The paths for optional artifacts are defined as filenames only, while local artifacts use full repository-relative paths. This leads to inconsistent path reporting in the generated JSON and Markdown artifacts. It is recommended to define all artifact paths relative to the repository root for consistency.

OPTIONAL_CROSS_REPO_ARTIFACTS = [
    Artifact(
        "benchmark_summary",
        "docs/reports/benchmark-summary.json",
        "Optional sanitized benchmark promotion summary from the experiment repository.",
        False,
    ),
    Artifact(
        "regression_summary",
        "docs/reports/regression-summary.json",
        "Optional sanitized regression promotion summary from the experiment repository.",
        False,
    ),
    Artifact(
        "sanitization_summary",
        "docs/reports/sanitization-summary.json",
        "Optional sanitized data-handling summary from the experiment repository.",
        False,
    ),
    Artifact(
        "report_contract_validation_report",
        "docs/reports/report-contract-validation-report.md",
        "Optional report-contract validation evidence from the experiment repository.",
        False,
    ),
]

]


ArtifactRecord = dict[str, object]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using dict[str, object] for structured data results in several type: ignore comments because the type checker cannot verify the dictionary's structure. Since this script targets Python 3.11+, using TypedDict would provide better type safety and allow for cleaner code without manual type suppression.

Comment on lines +125 to +139
def artifact_record(artifact: Artifact, base_dir: Path | None = None) -> ArtifactRecord:
"""Build a deterministic artifact status record without reading contents."""
absolute_path = (base_dir / artifact.path) if base_dir else (ROOT / artifact.path)
present = absolute_path.exists()
record: ArtifactRecord = {
"key": artifact.key,
"path": artifact.path,
"required": artifact.required,
"present": present,
"status": "present" if present else "missing",
"description": artifact.description,
}
if present and absolute_path.is_file():
record["size_bytes"] = absolute_path.stat().st_size
return record

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

By ensuring all artifact paths are repository-relative, the base_dir parameter can be removed, simplifying the logic for determining the absolute path.

Suggested change
def artifact_record(artifact: Artifact, base_dir: Path | None = None) -> ArtifactRecord:
"""Build a deterministic artifact status record without reading contents."""
absolute_path = (base_dir / artifact.path) if base_dir else (ROOT / artifact.path)
present = absolute_path.exists()
record: ArtifactRecord = {
"key": artifact.key,
"path": artifact.path,
"required": artifact.required,
"present": present,
"status": "present" if present else "missing",
"description": artifact.description,
}
if present and absolute_path.is_file():
record["size_bytes"] = absolute_path.stat().st_size
return record
def artifact_record(artifact: Artifact) -> ArtifactRecord:
"""Build a deterministic artifact status record without reading contents."""
absolute_path = ROOT / artifact.path
present = absolute_path.exists()
record: ArtifactRecord = {
"key": artifact.key,
"path": artifact.path,
"required": artifact.required,
"present": present,
"status": "present" if present else "missing",
"description": artifact.description,
}
if present and absolute_path.is_file():
record["size_bytes"] = absolute_path.stat().st_size
return record

Comment on lines +142 to +154
def determine_overall_status(local_records: Iterable[ArtifactRecord], optional_records: Iterable[ArtifactRecord]) -> str:
"""Return release-readiness status from local and optional artifacts."""
local_records = list(local_records)
optional_records = list(optional_records)
required_missing = [record for record in local_records if record["required"] and not record["present"]]
if required_missing:
return "red"

optional_missing = [record for record in optional_records if not record["present"]]
if optional_missing:
return "yellow"

return "green"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The status determination logic can be made more robust by processing all records together and relying on the required attribute of each artifact. This approach handles potential future changes where local artifacts might be optional.

Suggested change
def determine_overall_status(local_records: Iterable[ArtifactRecord], optional_records: Iterable[ArtifactRecord]) -> str:
"""Return release-readiness status from local and optional artifacts."""
local_records = list(local_records)
optional_records = list(optional_records)
required_missing = [record for record in local_records if record["required"] and not record["present"]]
if required_missing:
return "red"
optional_missing = [record for record in optional_records if not record["present"]]
if optional_missing:
return "yellow"
return "green"
def determine_overall_status(records: Iterable[ArtifactRecord]) -> str:
"""Return release-readiness status from artifact records."""
records_list = list(records)
if any(r["required"] and not r["present"] for r in records_list):
return "red"
if any(not r["present"] for r in records_list):
return "yellow"
return "green"

Comment on lines +160 to +163
optional_records = [artifact_record(artifact, REPORT_DIR) for artifact in OPTIONAL_CROSS_REPO_ARTIFACTS]
missing_required = [record["path"] for record in local_records if not record["present"]]
missing_optional = [record["path"] for record in optional_records if not record["present"]]
overall_status = determine_overall_status(local_records, optional_records)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Update the artifact processing and status determination to use the simplified artifact_record and determine_overall_status functions.

Suggested change
optional_records = [artifact_record(artifact, REPORT_DIR) for artifact in OPTIONAL_CROSS_REPO_ARTIFACTS]
missing_required = [record["path"] for record in local_records if not record["present"]]
missing_optional = [record["path"] for record in optional_records if not record["present"]]
overall_status = determine_overall_status(local_records, optional_records)
optional_records = [artifact_record(artifact) for artifact in OPTIONAL_CROSS_REPO_ARTIFACTS]
missing_required = [record["path"] for record in local_records if not record["present"]]
missing_optional = [record["path"] for record in optional_records if not record["present"]]
overall_status = determine_overall_status(local_records + optional_records)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add dashboard release health summary artifact

1 participant