Skip to content

feat: Implement autonomous repository management workflows and scripts - #176

Open
NITISH-R-G wants to merge 4 commits into
mainfrom
feat/autonomous-repo-management-13502038526694898968
Open

feat: Implement autonomous repository management workflows and scripts#176
NITISH-R-G wants to merge 4 commits into
mainfrom
feat/autonomous-repo-management-13502038526694898968

Conversation

@NITISH-R-G

@NITISH-R-G NITISH-R-G commented Aug 9, 2026

Copy link
Copy Markdown
Owner

This PR drastically transforms the repository into an advanced, autonomous engineering system to minimize human intervention and maximize GitHub's free tier functionality.

  1. Governance & Community: Added CODEOWNERS, CODE_OF_CONDUCT.md, and CONTRIBUTING.md. Setup greetings.yml, stale.yml, and labeler.yml to automatically manage contributors.
  2. AI Assistance: Replaced the outdated AI reviewer with coderabbitai/openai-pr-reviewer in ai-review.yml.
  3. Continuous Maintenance: Created repo-maintenance.yml to automatically format, lint, generate dependency SBOMs, build the codebase knowledge graph, and sync API documentation every night and on pushes.
  4. Documentation Sync & Knowledge Graph: Replaced dummy python scripts with functional tools leveraging Python's ast module (docs_sync.py and generate_knowledge_graph.py) to keep project structure self-documented in docs/api/. Fixed namespace collisions in documentation generation.
  5. Security & CI: Enabled advanced CodeQL security scans, added dependabot.yml for ecosystem updates, and split the deployment of GitHub pages to its own dedicated workflow (pages.yml). Added robust python pytest workflow (ci.yml).

PR created automatically by Jules for task 13502038526694898968 started by @NITISH-R-G

Summary by Sourcery

Automate repository maintenance, security scanning, CI, and community workflows, and generate synchronized API documentation and a code knowledge graph.

New Features:

  • Introduce a nightly and on-push repository maintenance workflow that auto-formats code, updates docs, builds a knowledge graph, and produces an SBOM.
  • Add automated AI-assisted pull request reviews, greetings for first-time contributors, stale issue/PR management, and pull request labeling based on file paths.
  • Generate structured API documentation and a JSON knowledge graph from the Python codebase to keep docs/api and docs/knowledge_graph.json in sync with the project structure.
  • Set up dedicated workflows to deploy the health dashboard to GitHub Pages and to run Python tests via pytest on pushes and pull requests.

Enhancements:

  • Reorganize Dependabot configuration to cover npm, pip, and GitHub Actions ecosystems with simplified settings.
  • Enable advanced multi-language CodeQL security scanning for JavaScript/TypeScript and Python.
  • Move GitHub Pages deployment out of the health dashboard workflow into its own workflow_run-triggered pipeline for clearer separation of concerns.

Build:

  • Add and configure multiple GitHub Actions workflows for CI, repository maintenance, security scanning, AI review, greetings, stale handling, labeling, and pages deployment.

CI:

  • Introduce a dedicated CI workflow that sets up Python with uv, installs dev/demo dependencies, and runs the pytest suite.
  • Add a CodeQL workflow to perform scheduled and on-change security analysis for JavaScript/TypeScript and Python code.

Deployment:

  • Create a standalone GitHub Pages deployment workflow triggered by successful health-dashboard runs.

Documentation:

  • Add CODE_OF_CONDUCT and CONTRIBUTING guidelines to formalize community standards and contribution processes.
  • Generate and commit extensive API reference markdown files under docs/api and a knowledge_graph.json artifact derived from the source tree.

Tests:

  • Document existing tests by generating API documentation stubs for test modules to reflect coverage and behavior at a high level.

Chores:

  • Add CODEOWNERS to define ownership of repository areas.
  • Remove the legacy ai-insights workflow in favor of the new maintenance and analysis tooling.

…lities

- Setup community guidelines and templates
- Configure AI PR reviewer action
- Configure stale issues and greetings automations
- Configure PR labeler based on file paths
- Add codeql security analysis workflow
- Add unified repo-maintenance workflow for formatting, linting, docs, kg, and sboms
- Create ast-based automated docs syncing tool
- Create ast-based automated knowledge graph generation tool
- Setup dependabot for pip, npm, and gh-actions
- Separate GitHub Pages deployment into its own workflow
- Configure robust testing CI

Co-authored-by: NITISH-R-G <225521762+NITISH-R-G@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @NITISH-R-G, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@sourcery-ai

sourcery-ai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR turns the repo into an autonomous, policy-governed project with nightly maintenance, security scanning, AI-assisted reviews, and auto-generated API docs/knowledge graph, primarily via new GitHub workflows and Python tooling that introspects the codebase with ast to keep documentation and structural metadata in sync.

Sequence diagram for repository maintenance workflow and automated docs/knowledge graph

sequenceDiagram
  participant GitHub as GitHub
  participant RepoMaintenanceWorkflow as repo_maintenance.yml
  participant DocsSync as docs_sync.py
  participant KnowledgeGraph as generate_knowledge_graph.py
  participant Repo as repo

  GitHub->>RepoMaintenanceWorkflow: trigger (push/schedule)
  RepoMaintenanceWorkflow->>Repo: actions/checkout
  RepoMaintenanceWorkflow->>RepoMaintenanceWorkflow: setup Python, Node, uv, cyclonedx-bom
  RepoMaintenanceWorkflow->>Repo: ruff check --fix . / ruff format . / prettier --write
  RepoMaintenanceWorkflow->>KnowledgeGraph: python tools/generate_knowledge_graph.py
  KnowledgeGraph->>KnowledgeGraph: build_knowledge_graph
  KnowledgeGraph->>Repo: write docs/knowledge_graph.json
  RepoMaintenanceWorkflow->>DocsSync: python tools/docs_sync.py
  DocsSync->>DocsSync: generate_api_docs
  DocsSync->>Repo: write docs/api/*.md
  RepoMaintenanceWorkflow->>Repo: git add -A / git commit / git push
Loading

File-Level Changes

Change Details Files
Introduce automated repository maintenance workflow that formats code, runs linting, generates SBOMs, updates docs, and builds a knowledge graph on pushes and nightly schedules.
  • Add repo-maintenance GitHub Actions workflow triggered on push to main/master and via cron
  • Install uv-based Python environment and cyclonedx-bom, plus global Prettier and web npm deps
  • Run ruff for lint+format, Prettier for JSON/Markdown/YAML including web/, and generate SBOM
  • Invoke custom tools/generate_knowledge_graph.py and tools/docs_sync.py, then auto-commit/push changes
.github/workflows/repo-maintenance.yml
Implement Python tooling to introspect the codebase with ast, generating an internal knowledge graph and per-module API markdown docs with collision-safe filenames.
  • Create generate_knowledge_graph.py that walks the tree, parses .py files with ast, and emits file/class/function nodes with contains edges
  • Write docs_sync.py to walk .py files, parse structure/docstrings, and write docs/api/.md using path-safe filenames to avoid collisions
  • Emit docs/knowledge_graph.json and many new docs/api/.md files documenting core modules, tools, viz, training, tests, and packages
  • Add small helper docs/api stubs for init modules and specific tools to keep documentation complete
tools/generate_knowledge_graph.py
tools/docs_sync.py
docs/knowledge_graph.json
docs/api/server_app.md
docs/api/ev_grid_oracle_models.md
docs/api/tools_build_road_graph.md
docs/api/training_fair_eval.md
docs/api/training_make_plots.md
docs/api/viz_city_map.md
docs/api/ev_grid_oracle_reward.md
docs/api/viz_gradio_demo.md
docs/api/ev_grid_oracle_env.md
docs/api/ev_grid_oracle_oracle_agent.md
docs/api/ev_grid_oracle_city_graph.md
docs/api/ev_grid_oracle_policies.md
docs/api/server_road_router.md
docs/api/tools_export_grpo_tensorboard_plots.md
docs/api/ev_grid_oracle_scenarios.md
docs/api/ev_grid_oracle_traffic.md
docs/api/server_role_metrics.md
docs/api/ev_grid_oracle_bescom_feed.md
docs/api/ev_grid_oracle_multi_agent.md
docs/api/ev_grid_oracle_world_model_verifier.md
docs/api/ev_grid_oracle_reward_hack.md
docs/api/server_ev_grid_road_environment.md
docs/api/tests_test_demo_api.md
docs/api/tests_test_env_determinism.md
docs/api/tools_fetch_bangalore_roads_overpass.md
docs/api/tools_fetch_osm_roads.md
docs/api/training_evaluate.md
docs/api/ev_grid_oracle_road_models.md
docs/api/ev_grid_oracle_grid_sim.md
docs/api/server_ev_grid_environment.md
docs/api/tests_test_evaluate_paired.md
docs/api/tests_test_policies_collapse.md
docs/api/ev_grid_oracle_demand_sim.md
docs/api/ev_grid_oracle_parsing.md
docs/api/ev_grid_oracle_road_env.md
docs/api/tests_test_models_and_graph.md
docs/api/tests_test_reward.md
docs/api/tools_prune_osm_geojson.md
docs/api/viz_record.md
docs/api/tests_test_fair_eval_mcnemar.md
docs/api/tests_test_parsing.md
docs/api/tools_road_reward_smoke.md
docs/api/tools_write_eval_snapshot.md
docs/api/viz_record_two_phase.md
docs/api/ev_grid_oracle___init__.md
docs/api/ev_grid_oracle_personas.md
docs/api/server___init__.md
docs/api/test_script.md
docs/api/tests_test_world_model_verifier.md
docs/api/training___init__.md
docs/api/tools_build_roads_render.md
docs/api/tools_docs_sync.md
docs/api/tools_generate_knowledge_graph.md
docs/api/tests___init__.md
docs/api/tools___init__.md
docs/api/viz___init__.md
Strengthen repository governance and contributor onboarding via CODEOWNERS, code of conduct, contributing guide, and community management workflows.
  • Add CODEOWNERS for ownership and review responsibility enforcement
  • Introduce Contributor Covenant CODE_OF_CONDUCT and CONTRIBUTING guide tailored to OpenEnv and uv/pytest flow
  • Add greetings workflow using first-interaction action to auto-welcome first-time issue/PR authors
  • Add stale workflow to mark and close inactive issues/PRs with configurable timings and labels
.github/CODEOWNERS
CODE_OF_CONDUCT.md
CONTRIBUTING.md
.github/workflows/greetings.yml
.github/workflows/stale.yml
Enhance CI and security posture with dedicated CodeQL analysis, Python test CI, and improved Dependabot configuration.
  • Add codeql.yml workflow with matrix over javascript-typescript and python using advanced configuration and weekly schedule
  • Create ci.yml workflow to run pytest under Python 3.12 with uv-managed editable install
  • Simplify dependabot.yml to enable npm, pip, and GitHub Actions ecosystems on weekly schedules without broad major-version ignore rules
.github/workflows/codeql.yml
.github/workflows/ci.yml
.github/dependabot.yml
Refactor GitHub Pages deployment for the health dashboard into a dedicated workflow triggered by workflow_run instead of in-line deployment.
  • Remove Pages deployment step from health-dashboard.yml, leaving dashboard artifact creation intact
  • Add pages.yml workflow that triggers on successful "Repository Health Dashboard" workflow_run, downloads the dashboard_output artifact, and deploys with peaceiris/actions-gh-pages
.github/workflows/health-dashboard.yml
.github/workflows/pages.yml
Replace the existing AI insights/reviewer setup with a modern AI PR reviewer and streamline automation labeler configuration.
  • Remove ai-insights.yml workflow and its prior AI reviewer integration
  • Add ai-review.yml workflow that runs coderabbitai/openai-pr-reviewer on PRs and certain comments, gated to non-bot senders
  • Add labeler.yml workflow plus .github/labeler.yml rules to auto-apply labels for core, frontend, tests, docs, and CI paths
.github/workflows/ai-insights.yml
.github/workflows/ai-review.yml
.github/workflows/labeler.yml
.github/labeler.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@NITISH-R-G, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 31 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ffccd73a-71f7-4ea3-964e-dfd31281af4a

📥 Commits

Reviewing files that changed from the base of the PR and between 5251a21 and c3bf901.

📒 Files selected for processing (1)
  • .github/workflows/ai-review.yml
📝 Walkthrough

Summary by CodeRabbit

  • Documentation

    • Added comprehensive API reference documentation across simulation, server, routing, visualization, training, and evaluation.
    • Added contributor setup, testing, pull request, and community conduct guidance.
  • Quality & Security

    • Added CI testing, CodeQL security analysis, dependency updates, pull-request labeling, stale-item management, and welcome messages.
    • Added automated documentation and knowledge-graph generation.
  • Infrastructure

    • Added health-dashboard deployment to GitHub Pages.
    • Replaced the previous AI review automation with a new review workflow.
    • Added repository maintenance automation and improved configuration for code ownership and labeling.

Walkthrough

This pull request adds repository governance, GitHub Actions workflows, scheduled maintenance automation, AST-based documentation and knowledge-graph tools, contributor policies, and generated API reference pages.

Changes

Repository automation and documentation

Layer / File(s) Summary
Governance and GitHub workflows
.github/CODEOWNERS, .github/dependabot.yml, .github/labeler.yml, .github/workflows/*, .gitignore, CODE_OF_CONDUCT.md, CONTRIBUTING.md
Adds repository ownership, dependency, labeling, CI, CodeQL, review, greetings, Pages, stale, and contributor configurations.
Documentation and knowledge-graph generation
tools/docs_sync.py, tools/generate_knowledge_graph.py, docs/api/*
Adds AST-based generators and API documentation for runtime, server, test, tool, training, and visualization modules.
Scheduled repository maintenance
.github/workflows/repo-maintenance.yml
Adds scheduled formatting, documentation and graph generation, SBOM creation, and automatic commit and push steps.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested labels: documentation, ci, tools

Poem

A rabbit checks the workflows bright,
And documents each path just right.
Graphs grow, pages bloom,
CI clears the room,
While scheduled paws commit at night.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: autonomous repository management workflows and supporting scripts.
Description check ✅ Passed The description directly explains the governance, automation, documentation, security, dependency, deployment, and CI changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/autonomous-repo-management-13502038526694898968

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added ci documentation Improvements or additions to documentation tools labels Aug 9, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 25

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ai-review.yml:
- Around line 12-15: Add a concurrency configuration to the review job in the
workflow, using a group key based on the pull request or issue number and
enabling cancel-in-progress so newer runs cancel stale model calls. Preserve the
existing review job condition and runner settings.
- Around line 18-21: Update the action reference in the workflow step using
coderabbitai/openai-pr-reviewer so it points to a reviewed full commit SHA
instead of the mutable latest tag, and retain the corresponding release tag in
an inline comment for traceability. Leave the existing environment variables and
workflow behavior unchanged.
- Around line 2-6: Update the workflow trigger and job conditions around
issue_comment so reviews run only for comments on pull requests containing an
explicit supported review command from an authorized commenter. Retain the
existing pull_request triggers, exclude non-PR issue comments and unauthorized
authors, and ensure the authorization check is applied before using GITHUB_TOKEN
or OPENAI_API_KEY.

In @.github/workflows/ci.yml:
- Around line 13-16: Disable persisted checkout credentials by adding
persist-credentials: false to the Checkout repository steps in
.github/workflows/ci.yml lines 13-16, .github/workflows/codeql.yml lines 32-35,
and .github/workflows/pages.yml lines 17-20.
- Around line 14-19: Pin every GitHub Actions uses reference to a reviewed full
commit SHA instead of a mutable tag or branch. Apply this to all action
references in .github/workflows/ci.yml (lines 14-19),
.github/workflows/codeql.yml (lines 32-44), .github/workflows/greetings.yml
(line 17), .github/workflows/labeler.yml (line 14), .github/workflows/pages.yml
(lines 18-31), and .github/workflows/stale.yml (line 15), including CodeQL and
repository-scoped actions; also update the repository-scoped references in
.github/workflows/repo-maintenance.yml, .github/workflows/ai-review.yml,
.github/workflows/security.yml, and .github/workflows/health-dashboard.yml.
- Around line 26-30: Update the CI dependency setup around the “Install
dependencies” and “Run Pytest” steps so the environment used by uv run includes
the dev dependencies, either by requesting the dev extra when invoking pytest or
by synchronizing the project with uv sync; preserve the existing test command
behavior.

In @.github/workflows/repo-maintenance.yml:
- Line 5: Update the branches sequence in the workflow configuration to remove
the spaces immediately inside the brackets, using yamllint-compatible
flow-sequence formatting while preserving the existing main and master branch
values.
- Around line 58-64: Update the “Commit changes” workflow step to check for
staged changes after git add -A and skip git commit only when none exist. Remove
the || echo fallback so failures from git commit propagate and fail the
workflow, while preserving the existing push behavior for successful commits.
- Around line 3-7: Add a workflow-level concurrency configuration alongside the
existing triggers in repo-maintenance.yml, defining a shared concurrency.group
and setting cancel-in-progress to false so push and scheduled runs queue rather
than execute concurrently.
- Line 18: Update the workflow’s actions/checkout, actions/setup-python, and
actions/setup-node references from version tags to their corresponding immutable
full commit SHAs. Preserve each action’s current version and configuration while
ensuring all privileged workflow action references use pinned SHAs.
- Line 32: Pin the maintenance toolchain versions in the workflow steps using
Prettier, uv, ruff, and cyclonedx-bom. Update the npm, pip/uv, and CycloneDX
installation or invocation commands accordingly, using npx --no-install for
Prettier when the locked web package dependency is available; keep all
maintenance commands otherwise unchanged.
- Around line 9-10: Update the workflow-level permissions to default contents
access to read, then add a permissions block under the maintenance job granting
contents write. Keep write access scoped only to jobs.maintenance.
- Around line 17-21: Update the checkout configuration in the repository
maintenance workflow to set persist-credentials to false. Add credential
persistence or equivalent Git authentication only in the final git push step,
ensuring subsequent uv, Ruff, and repository script steps cannot access the
checkout token.

In `@CODE_OF_CONDUCT.md`:
- Around line 39-49: Add an actionable reporting section near “Enforcement
Responsibilities” in the Code of Conduct, identifying the repository’s private
reporting address or reporting-policy link and briefly describing the escalation
and response process. Ensure contributors have a safe, explicit channel for
reporting violations.

In `@docs/api/ev_grid_oracle_city_graph.md`:
- Around line 1-3: Update the heading-generation logic in tools/docs_sync.py so
that, when no module-info section exists, the API section or first API entry
uses H2 rather than emitting H3 directly after the H1. Then regenerate
docs/api/ev_grid_oracle_city_graph.md:1-3,
docs/api/ev_grid_oracle_demand_sim.md:1-3, docs/api/ev_grid_oracle_env.md:1-3,
docs/api/ev_grid_oracle_grid_sim.md:1-3, docs/api/ev_grid_oracle_models.md:1-3,
docs/api/tools_docs_sync.md:1-3,
docs/api/tools_fetch_bangalore_roads_overpass.md:1-3,
docs/api/tools_fetch_osm_roads.md:1-3, and
docs/api/tools_generate_health_dashboard.md:1-3 using the corrected generator.

In `@docs/api/ev_grid_oracle_multi_agent.md`:
- Line 3: Update the documentation generator’s heading-depth logic so top-level
classes, functions, and policies emit H2 headings, while nested class members
remain H3. Regenerate the affected pages:
docs/api/ev_grid_oracle_multi_agent.md:3-3,
docs/api/ev_grid_oracle_oracle_agent.md:3-3,
docs/api/ev_grid_oracle_parsing.md:3-3, docs/api/ev_grid_oracle_personas.md:3-3,
docs/api/ev_grid_oracle_policies.md:3-3,
docs/api/tools_generate_knowledge_graph.md:3-3,
docs/api/tools_prune_osm_geojson.md:3-3, and
docs/api/tools_road_reward_smoke.md:3-3; update each listed top-level heading as
specified, with no direct changes needed to nested member headings.

In `@docs/api/ev_grid_oracle_reward.md`:
- Line 3: Update tools/docs_sync.py to emit an H2 parent before H3 API entries
when no Module Info section exists, then regenerate the affected pages:
docs/api/ev_grid_oracle_reward.md:3-3 before Class: RewardWeights;
docs/api/ev_grid_oracle_reward_hack.md:3-3 before Class: RewardHackDetector;
docs/api/ev_grid_oracle_road_env.md:3-3 before Class: RoadCore;
docs/api/ev_grid_oracle_road_models.md:3-3 before Class: RoadAction;
docs/api/ev_grid_oracle_scenarios.md:3-3 before Class: ScenarioEvent;
docs/api/training_evaluate.md:3-3 before Class: EpisodeMetrics;
docs/api/training_fair_eval.md:3-3 before Function: _binom_two_sided_exact_p;
and docs/api/training_make_plots.md:3-3 before Function: _boxplot_compat.

In `@docs/api/ev_grid_oracle_traffic.md`:
- Line 3: Update the shared heading template in tools/docs_sync.py so generated
API pages preserve the H2 hierarchy by emitting a level-2 parent or making the
first API heading level 2. Regenerate the affected headings at line 3 in
docs/api/ev_grid_oracle_traffic.md,
docs/api/ev_grid_oracle_world_model_verifier.md, docs/api/server_app.md,
docs/api/server_ev_grid_environment.md, docs/api/viz_city_map.md,
docs/api/viz_gradio_demo.md, docs/api/viz_record.md, and
docs/api/viz_record_two_phase.md.

In `@docs/api/server___init__.md`:
- Line 1: Update the title-generation logic in tools/docs_sync.py to qualify
package initializer pages with their package namespace, producing a title such
as server/__init__.py instead of only __init__.py. Then regenerate
docs/api/server___init__.md so its heading reflects the qualified title.

In `@docs/api/server_ev_grid_road_environment.md`:
- Line 3: Update tools/docs_sync.py so generated class and function headings
receive an ## API parent when no module docstring exists, then regenerate
docs/api/server_ev_grid_road_environment.md (3-3),
docs/api/server_road_router.md (3-3), docs/api/server_role_metrics.md (3-3),
docs/api/test_script.md (3-3), docs/api/tests_test_demo_api.md (3-3),
docs/api/tests_test_evaluate_paired.md (3-3),
docs/api/tests_test_fair_eval_mcnemar.md (3-3), and
docs/api/tests_test_models_and_graph.md (3-3) to include the new heading
hierarchy.

In `@docs/api/tools_export_grpo_tensorboard_plots.md`:
- Around line 7-13: Format the pip install and export commands in
docs/api/tools_export_grpo_tensorboard_plots.md as a fenced bash code block (or
consistently indented code block), then regenerate the documentation page so the
rendered commands are copyable.

In `@tools/docs_sync.py`:
- Around line 37-47: Update the heading levels emitted by the AST traversal in
tools/docs_sync.py: change the ClassDef and FunctionDef headings from level 3 to
level 2 so generated API pages remain hierarchically valid when modules lack
docstrings, then regenerate the docs/api output.
- Around line 21-28: Update the output-path construction in the documentation
sync flow around rel_dir and doc_path to preserve the relative directory
structure under docs/api instead of flattening directories with underscores.
Build doc_path from the relative source directory and the converted Markdown
filename so distinct modules such as foo/bar_baz.py and foo_bar/baz.py cannot
overwrite each other.
- Around line 48-49: Update tools/docs_sync.py lines 48-49 to collect read,
parse, and write failures during traversal, continue processing remaining files,
and raise an aggregated failure after traversal instead of only printing errors.
In tools/generate_knowledge_graph.py lines 52-53, collect read and parse
failures and raise them before writing docs/knowledge_graph.json, ensuring both
generators exit unsuccessfully when any source file cannot be processed.

In `@tools/generate_knowledge_graph.py`:
- Around line 27-51: Update the AST traversal around the class/function handling
to recurse with a lexical ancestor path instead of using ast.walk directly.
Build each class and function ID from filepath plus its enclosing class/function
names, connect nested definitions to their immediate containing node (including
methods to their class), and retain the filepath edge only for top-level
definitions.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b464e309-ca76-4c2c-ac5a-5cc08d120573

📥 Commits

Reviewing files that changed from the base of the PR and between c110413 and f109878.

📒 Files selected for processing (77)
  • .github/CODEOWNERS
  • .github/dependabot.yml
  • .github/labeler.yml
  • .github/workflows/ai-insights.yml
  • .github/workflows/ai-review.yml
  • .github/workflows/ci.yml
  • .github/workflows/codeql.yml
  • .github/workflows/greetings.yml
  • .github/workflows/health-dashboard.yml
  • .github/workflows/labeler.yml
  • .github/workflows/pages.yml
  • .github/workflows/repo-maintenance.yml
  • .github/workflows/stale.yml
  • .gitignore
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • docs/api/ev_grid_oracle___init__.md
  • docs/api/ev_grid_oracle_bescom_feed.md
  • docs/api/ev_grid_oracle_city_graph.md
  • docs/api/ev_grid_oracle_demand_sim.md
  • docs/api/ev_grid_oracle_env.md
  • docs/api/ev_grid_oracle_grid_sim.md
  • docs/api/ev_grid_oracle_models.md
  • docs/api/ev_grid_oracle_multi_agent.md
  • docs/api/ev_grid_oracle_oracle_agent.md
  • docs/api/ev_grid_oracle_parsing.md
  • docs/api/ev_grid_oracle_personas.md
  • docs/api/ev_grid_oracle_policies.md
  • docs/api/ev_grid_oracle_reward.md
  • docs/api/ev_grid_oracle_reward_hack.md
  • docs/api/ev_grid_oracle_road_env.md
  • docs/api/ev_grid_oracle_road_models.md
  • docs/api/ev_grid_oracle_scenarios.md
  • docs/api/ev_grid_oracle_traffic.md
  • docs/api/ev_grid_oracle_world_model_verifier.md
  • docs/api/server___init__.md
  • docs/api/server_app.md
  • docs/api/server_ev_grid_environment.md
  • docs/api/server_ev_grid_road_environment.md
  • docs/api/server_road_router.md
  • docs/api/server_role_metrics.md
  • docs/api/test_script.md
  • docs/api/tests___init__.md
  • docs/api/tests_test_demo_api.md
  • docs/api/tests_test_env_determinism.md
  • docs/api/tests_test_evaluate_paired.md
  • docs/api/tests_test_fair_eval_mcnemar.md
  • docs/api/tests_test_models_and_graph.md
  • docs/api/tests_test_parsing.md
  • docs/api/tests_test_policies_collapse.md
  • docs/api/tests_test_reward.md
  • docs/api/tests_test_world_model_verifier.md
  • docs/api/tools___init__.md
  • docs/api/tools_build_road_graph.md
  • docs/api/tools_build_roads_render.md
  • docs/api/tools_docs_sync.md
  • docs/api/tools_export_grpo_tensorboard_plots.md
  • docs/api/tools_fetch_bangalore_roads_overpass.md
  • docs/api/tools_fetch_osm_roads.md
  • docs/api/tools_generate_health_dashboard.md
  • docs/api/tools_generate_knowledge_graph.md
  • docs/api/tools_prune_osm_geojson.md
  • docs/api/tools_road_reward_smoke.md
  • docs/api/tools_sync_space_to_hub.md
  • docs/api/tools_write_eval_snapshot.md
  • docs/api/training___init__.md
  • docs/api/training_evaluate.md
  • docs/api/training_fair_eval.md
  • docs/api/training_make_plots.md
  • docs/api/viz___init__.md
  • docs/api/viz_city_map.md
  • docs/api/viz_gradio_demo.md
  • docs/api/viz_record.md
  • docs/api/viz_record_two_phase.md
  • docs/knowledge_graph.json
  • tools/docs_sync.py
  • tools/generate_knowledge_graph.py
💤 Files with no reviewable changes (2)
  • .github/workflows/ai-insights.yml
  • .github/workflows/health-dashboard.yml
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: frontend-quality
  • GitHub Check: python-quality
⚠️ CI failures not shown inline (2)

GitHub Actions: AI Review / 0_review.txt: feat: Implement autonomous repository management workflows and scripts

Conclusion: failure

View job details

##[group]GITHUB_TOKEN Permissions
 Contents: read
 Metadata: read
 PullRequests: write
 ##[endgroup]
 Secret source: Actions
 Prepare workflow directory
 Prepare all required actions
 Getting action download info
 ##[error]Unable to resolve action `coderabbitai/openai-pr-reviewer`, not found

GitHub Actions: AI Review / review: feat: Implement autonomous repository management workflows and scripts

Conclusion: failure

View job details

##[group]GITHUB_TOKEN Permissions
 Contents: read
 Metadata: read
 PullRequests: write
 ##[endgroup]
 Secret source: Actions
 Prepare workflow directory
 Prepare all required actions
 Getting action download info
 ##[error]Unable to resolve action `coderabbitai/openai-pr-reviewer`, not found
🧰 Additional context used
🪛 ast-grep (0.45.0)
tools/docs_sync.py

[warning] 15-15: File path is request-/variable-derived; validate and normalize to prevent path traversal.
Context: open(filepath, "r", encoding="utf-8")
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

(open-filename-from-request)


[warning] 29-29: File path is request-/variable-derived; validate and normalize to prevent path traversal.
Context: open(doc_path, "w", encoding="utf-8")
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

(open-filename-from-request)

tools/generate_knowledge_graph.py

[warning] 17-17: File path is request-/variable-derived; validate and normalize to prevent path traversal.
Context: open(filepath, "r", encoding="utf-8")
Note: [CWE-22] Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

(open-filename-from-request)

🪛 LanguageTool
CONTRIBUTING.md

[style] ~24-~24: Consider using a less common alternative to make your writing sound more unique and professional.
Context: ...int, you're ready to make your changes. Feel free to ask for help; everyone is a beginner at...

(FEEL_FREE_TO_STYLE_ME)

CODE_OF_CONDUCT.md

[style] ~32-~32: Try using a synonym here to strengthen your wording.
Context: ...ind * Trolling, insulting or derogatory comments, and personal or political attacks * Pu...

(COMMENT_REMARK)

🪛 markdownlint-cli2 (0.23.2)
docs/api/ev_grid_oracle_road_env.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/server_ev_grid_environment.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/tools_generate_knowledge_graph.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/tools_fetch_osm_roads.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/tools_docs_sync.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/tests_test_evaluate_paired.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/server_ev_grid_road_environment.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/tests_test_parsing.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_personas.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_road_models.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/tools_road_reward_smoke.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/test_script.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/tools_fetch_bangalore_roads_overpass.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/tests_test_models_and_graph.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/training_evaluate.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_world_model_verifier.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/tests_test_fair_eval_mcnemar.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_grid_sim.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_scenarios.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_parsing.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/tools_build_road_graph.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/viz_gradio_demo.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_city_graph.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_multi_agent.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_oracle_agent.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_policies.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/tests_test_demo_api.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_demand_sim.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/training_fair_eval.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_reward.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_env.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_bescom_feed.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/tests_test_world_model_verifier.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/tools_build_roads_render.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/viz_record_two_phase.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/viz_city_map.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/tools_prune_osm_geojson.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_traffic.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/server_road_router.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_reward_hack.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/training_make_plots.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/viz_record.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/tools_generate_health_dashboard.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/server_role_metrics.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/tests_test_reward.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/ev_grid_oracle_models.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/api/server_app.md

[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

🪛 YAMLlint (1.37.1)
.github/workflows/ci.yml

[warning] 3-3: truthy value should be one of [false, true]

(truthy)


[error] 5-5: too many spaces inside brackets

(brackets)


[error] 5-5: too many spaces inside brackets

(brackets)


[error] 7-7: too many spaces inside brackets

(brackets)


[error] 7-7: too many spaces inside brackets

(brackets)

.github/workflows/codeql.yml

[warning] 3-3: truthy value should be one of [false, true]

(truthy)


[error] 5-5: too many spaces inside brackets

(brackets)


[error] 5-5: too many spaces inside brackets

(brackets)


[error] 7-7: too many spaces inside brackets

(brackets)


[error] 7-7: too many spaces inside brackets

(brackets)

.github/workflows/repo-maintenance.yml

[warning] 3-3: truthy value should be one of [false, true]

(truthy)


[error] 5-5: too many spaces inside brackets

(brackets)


[error] 5-5: too many spaces inside brackets

(brackets)

🪛 zizmor (1.29.0)
.github/workflows/ci.yml

[warning] 13-16: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[warning] 1-31: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)


[error] 14-14: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 19-19: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[info] 10-10: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)


[warning] 3-7: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting

(concurrency-limits)

.github/workflows/ai-review.yml

[error] 10-10: overly broad permissions (excessive-permissions): pull-requests: write is overly broad at the workflow level

(excessive-permissions)


[error] 18-18: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[warning] 10-10: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment

(undocumented-permissions)


[info] 13-13: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)


[warning] 2-6: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting

(concurrency-limits)

.github/workflows/codeql.yml

[warning] 32-35: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[warning] 1-47: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)


[error] 33-33: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 38-38: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 44-44: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[warning] 17-17: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment

(undocumented-permissions)


[warning] 3-9: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting

(concurrency-limits)

.github/workflows/pages.yml

[warning] 17-20: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 10-10: overly broad permissions (excessive-permissions): contents: write is overly broad at the workflow level

(excessive-permissions)


[error] 3-7: use of fundamentally insecure workflow trigger (dangerous-triggers): workflow_run is almost always used insecurely

(dangerous-triggers)


[error] 18-18: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 23-23: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 31-31: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[warning] 10-10: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment

(undocumented-permissions)


[info] 13-13: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)


[warning] 3-7: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting

(concurrency-limits)

.github/workflows/greetings.yml

[error] 10-10: overly broad permissions (excessive-permissions): issues: write is overly broad at the workflow level

(excessive-permissions)


[error] 11-11: overly broad permissions (excessive-permissions): pull-requests: write is overly broad at the workflow level

(excessive-permissions)


[error] 3-7: use of fundamentally insecure workflow trigger (dangerous-triggers): pull_request_target is almost always used insecurely

(dangerous-triggers)


[error] 17-17: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[warning] 10-10: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment

(undocumented-permissions)


[info] 14-14: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)


[warning] 3-7: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting

(concurrency-limits)

.github/workflows/stale.yml

[error] 8-8: overly broad permissions (excessive-permissions): issues: write is overly broad at the workflow level

(excessive-permissions)


[error] 9-9: overly broad permissions (excessive-permissions): pull-requests: write is overly broad at the workflow level

(excessive-permissions)


[error] 15-15: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[warning] 8-8: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment

(undocumented-permissions)


[info] 12-12: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)


[warning] 3-5: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting

(concurrency-limits)

.github/workflows/labeler.yml

[error] 8-8: overly broad permissions (excessive-permissions): pull-requests: write is overly broad at the workflow level

(excessive-permissions)


[error] 14-14: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[warning] 8-8: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment

(undocumented-permissions)


[info] 11-11: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)


[warning] 2-4: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting

(concurrency-limits)

.github/workflows/repo-maintenance.yml

[warning] 17-21: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 10-10: overly broad permissions (excessive-permissions): contents: write is overly broad at the workflow level

(excessive-permissions)


[error] 18-18: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 24-24: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 29-29: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[warning] 10-10: permissions without explanatory comments (undocumented-permissions): needs an explanatory comment

(undocumented-permissions)


[info] 13-13: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)


[warning] 3-7: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting

(concurrency-limits)


[warning] 32-32: ad-hoc installation of packages (adhoc-packages): installs a package outside of a lockfile

(adhoc-packages)

🔇 Additional comments (13)
.github/CODEOWNERS (1)

1-1: LGTM!

.github/dependabot.yml (1)

7-10: 🗄️ Data Integrity & Integration

Verify that pip updates keep uv.lock synchronized.

The repository uses a root pyproject.toml and uv.lock. CONTRIBUTING.md:15-20 directs contributors to use uv sync --all-extras. Confirm that a Dependabot update changes both the dependency declarations and the lockfile, and that the generated PR passes dependency checks. Otherwise, the declared and resolved versions can diverge.

.github/labeler.yml (1)

1-24: 🎯 Functional Correctness

Verify the labeler configuration schema.

This file uses the any rule form. Confirm that .github/workflows/labeler.yml invokes an actions/labeler version that accepts this form and loads this file. Otherwise, the workflow can run without applying the core, frontend, tests, docs, and ci labels.

.gitignore (1)

34-34: LGTM!

CONTRIBUTING.md (1)

1-3: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Replace template-specific repository and branch commands.

CONTRIBUTING.md still hard-codes NITISH-R-G/OpenEnv.git, master, and 325-add-japanese-translations, but this repository is ev-grid-oracle on main. Use that upstream repo name and default branch, and replace the specific checkout with a generic <feature-branch> placeholder.

Example adjustment
-git push --set-upstream origin 325-add-japanese-translations
+git push --set-upstream origin <feature-branch>
			> Likely an incorrect or invalid review comment.
.github/workflows/pages.yml (1)

4-15: 🔒 Security & Privacy

No change needed for Pages deployment scope.

Repository Health Dashboard does not deploy to Pages; it only uploads the health-dashboard artifact.

			> Likely an incorrect or invalid review comment.
docs/api/tools_sync_space_to_hub.md (1)

1-17: LGTM!

docs/api/tools_write_eval_snapshot.md (1)

1-7: LGTM!

docs/api/training___init__.md (1)

1-6: LGTM!

docs/api/viz___init__.md (1)

1-2: LGTM!

.github/workflows/repo-maintenance.yml (1)

49-64: 🩺 Stability & Availability

Verify generated output is idempotent before self-pushing.

This workflow runs on pushes to main and master, then pushes generated documentation, graph, and SBOM changes. If any generator emits timestamps, UUIDs, or unstable ordering, each run can create another commit and trigger another maintenance run. Generate the outputs twice from the same revision and compare them. Normalize or exclude volatile fields.

docs/api/tests___init__.md (1)

1-2: LGTM!

docs/api/tests_test_env_determinism.md (1)

1-14: LGTM!

Comment on lines +2 to +6
on:
pull_request:
types: [opened, synchronize, reopened]
issue_comment:
types: [created]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Repo files:\n'
git ls-files | rg '(^|/)(ai-review\.yml|.*workflow.*|.*workflows.*)$' || true

printf '\nWorkflow excerpt:\n'
if [ -f .github/workflows/ai-review.yml ]; then
  nl -ba .github/workflows/ai-review.yml | sed -n '1,80p'
fi

printf '\nSearch for issue_comment usage:\n'
rg -n "issue_comment|pull_request|pull-requests: write|openai-pr-reviewer|from.*secrets|OPENAI_API_KEY|GITHUB_TOKEN|permissions:" .github/workflows || true

printf '\nGitHub event/docs equivalent references in repo (if any):\n'
rg -n "issue|comment" .github/workflows README.md . 2>/dev/null | head -200 || true

Repository: NITISH-R-G/ev-grid-oracle

Length of output: 582


🌐 Web query:

GitHub Actions issues event issue_comment pull_request comment author permission pull request

💡 Result:

To handle GitHub Actions workflows triggered by comments on pull requests, it is important to distinguish between the event type, the necessary permissions, and the security context of the PR author. Event Triggering and Context The issue_comment event is the standard trigger for workflows running on comments, covering both issues and pull requests [1][2]. Because this event is shared, you must filter your workflow to execute only when the comment originates from a pull request [1]. You can perform this check using a conditional in your workflow: jobs: pr_commented: if: github.event.issue.pull_request!= null runs-on: ubuntu-latest steps: - name: A comment on a PR run: echo "PR number is ${{ github.event.issue.number }}" Permission Requirements When your workflow needs to interact with pull requests—such as posting comments or adding reactions—you must explicitly grant the necessary permissions in your workflow configuration [3]. Contrary to what the REST API path (/repos/…/issues/comments/…) might imply, comments on pull requests belong to the pull-requests resource [3]. Therefore, you should grant: permissions: pull-requests: write Granting only issues: write is often insufficient or incorrect for pull request operations, and may result in 403 Forbidden errors [3]. Security Considerations If you need to restrict your workflow to specific users (e.g., the PR author or users with certain permissions), you can use expressions based on the GitHub context [4]. 1. Restricting by Author: You can gate the job using an if condition that checks the PR author: if: github.event.pull_request.user.login == 'target-username' 2. Security and Forks: Workflows triggered by issue_comment run from the default branch, which is generally secure [2][3]. However, if you use the pull_request_target event to handle PRs from forks, be aware that it runs with elevated permissions and access to secrets [5][6]. You must carefully validate that the logic does not inadvertently execute untrusted code or expose sensitive information [5][7]. For complex requirements, such as running scripts based on specific comment commands, consider checking the user's author_association (e.g., OWNER, COLLABORATOR) to ensure only trusted users can trigger sensitive automation [8][4].

Citations:


🌐 Web query:

GitHub Actions pull_request_target issue_comment authorized actors repository permissions

💡 Result:

In GitHub Actions, the pull_request_target event and other triggers like issue_comment are considered privileged because they execute within the context of the base repository rather than the pull request's source branch [1][2][3]. This creates a significant security risk known as a "pwn request" if the workflow is configured to check out and execute untrusted code from a fork [4][2]. Key Security Considerations and Permissions: 1. Privileged Context: Unlike the standard pull_request trigger—which runs in an unprivileged environment with read-only tokens and no access to repository secrets when triggered from a fork—pull_request_target and issue_comment have access to the base repository's secrets and a read/write GITHUB_TOKEN by default [1][2][5]. 2. Authorized Actors: On public repositories, pull_request_target, issue_comment, and similar event-triggered workflows can be triggered by any user who can open a pull request, comment, or interact with the repository, regardless of their collaborator status [6][2]. This means an external attacker can trigger code that runs with your repository's full privileges [2][3]. 3. The "Pwn Request" Risk: The primary danger arises when a workflow running under these triggers automatically checks out the pull request head (the attacker-controlled code) and executes it (e.g., via build scripts, npm install, or other language-specific package managers) [4][2]. Because the workflow runs in the privileged base context, this code can exfiltrate secrets or modify the repository [1][3]. 4. Mitigation Strategies: - Avoid executing untrusted code: Never check out and run code from a pull request or comment context within a privileged workflow [7][2]. - Restrict triggers: Use the if condition to limit workflows to authorized actors (e.g., if: github.event.comment.author_association == 'MEMBER') [6][2]. - Use least privilege: Always define explicit permissions for the GITHUB_TOKEN at the job or workflow level to minimize potential impact if the workflow is compromised [1][8]. - Prefer unprivileged triggers: Whenever possible, use the standard pull_request trigger to handle untrusted code [2][9]. If a privileged operation is required, consider a two-step process: an unprivileged pull_request workflow to perform the work and store artifacts, followed by a separate workflow_run workflow to consume those artifacts in a privileged environment [7][2]. As of June 2026, GitHub has introduced safer defaults for actions/checkout when used with pull_request_target to help block the accidental checkout of untrusted fork heads, though users should still treat opting out of these protections as a serious security decision [4].

Citations:


🏁 Script executed:

#!/bin/bash
set -u

printf 'Workflow excerpt:\n'
sed -n '1,80p' .github/workflows/ai-review.yml 2>/dev/null | python3 - <<'PS'
from pathlib import Path
p = Path('/tmp/fake')
text = __import__('sys', fromlist=['stdin']).stdin.read().splitlines()
for i, line in enumerate(text, 1):
    print(f'{i:4d} {line}')
PS

printf '\nRelevant workflow search:\n'
grep -RInE 'on:|pull_request:|issue_comment:|pull-requests:|contents:|permissions:|GITHUB_TOKEN|OPENAI_API_KEY|coderabbitai/openai-pr-reviewer|github.event.issue.pull_request|github.event.comment|author_association|comment\.body|types:' .github/workflows/ai-review.yml .github/workflows || true

printf '\nChanged files summary:\n'
git diff --stat HEAD~1..HEAD 2>/dev/null || git diff --stat 2>/dev/null || true

Repository: NITISH-R-G/ev-grid-oracle

Length of output: 10393


🏁 Script executed:

#!/bin/bash
set -u

printf 'Workflow excerpt:\n'
awk '{printf "%4d: %s\n", NR, $0}' .github/workflows/ai-review.yml

printf '\nPython read-only invariant check:\n'
python3 - <<'PY'
from pathlib import Path
from urllib.parse import urlparse

p = Path(".github/workflows/ai-review.yml")
text = p.read_text()
if "issue_comment:" in text and "types: [created]" in text:
    print("issue_comment created trigger present")
else:
    print("issue_comment created trigger absent")
if "GITHUB_TOKEN:" in text and "OPENAI_API_KEY:" in text:
    print("workflow passes GITHUB_TOKEN and OPENAI_API_KEY to action")
if "coderabbitai/openai-pr-reviewer@latest" in text:
    print("mutable action tag: coderabbitai/openai-pr-reviewer@latest")

url = urlparse("https://github.com/coderabbitai/openai-pr-reviewer")
if url.path.endswith("/openai-pr-reviewer") and url.hostname in ("github.com", "github.io"):
    print("action_name=coderabbitai/openai-pr-reviewer")
    print("full_ref=latest")
PY

Repository: NITISH-R-G/ev-grid-oracle

Length of output: 1044


Gate comment-triggered reviews to authorized PR commands.

issue_comment: created runs for every new issue comment. The job currently filters only on github.event.sender.type != 'Bot', so any commenter can start a run with GITHUB_TOKEN and OPENAI_API_KEY. Restrict this path to pull-request comments with an explicit review command and an authorized author.

🧰 Tools
🪛 zizmor (1.29.0)

[warning] 2-6: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting

(concurrency-limits)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ai-review.yml around lines 2 - 6, Update the workflow
trigger and job conditions around issue_comment so reviews run only for comments
on pull requests containing an explicit supported review command from an
authorized commenter. Retain the existing pull_request triggers, exclude non-PR
issue comments and unauthorized authors, and ensure the authorization check is
applied before using GITHUB_TOKEN or OPENAI_API_KEY.

Comment on lines +12 to +15
jobs:
review:
runs-on: ubuntu-latest
if: ${{ github.event.sender.type != 'Bot' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Cancel stale review runs.

pull_request.synchronize and issue_comment.created can start multiple jobs before the previous model call finishes. Add a concurrency group keyed by the pull request or issue number and set cancel-in-progress: true. Otherwise, stale or duplicate reviews can consume API quota and post outdated results.

Proposed concurrency setting
+concurrency:
+  group: ai-review-${{ github.event.pull_request.number || github.event.issue.number }}
+  cancel-in-progress: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
jobs:
review:
runs-on: ubuntu-latest
if: ${{ github.event.sender.type != 'Bot' }}
concurrency:
group: ai-review-${{ github.event.pull_request.number || github.event.issue.number }}
cancel-in-progress: true
jobs:
review:
runs-on: ubuntu-latest
if: ${{ github.event.sender.type != 'Bot' }}
🧰 Tools
🪛 zizmor (1.29.0)

[info] 13-13: workflow or action definition without a name (anonymous-definition): this job

(anonymous-definition)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ai-review.yml around lines 12 - 15, Add a concurrency
configuration to the review job in the workflow, using a group key based on the
pull request or issue number and enabling cancel-in-progress so newer runs
cancel stale model calls. Preserve the existing review job condition and runner
settings.

Source: Linters/SAST tools

Comment thread .github/workflows/ai-review.yml Outdated
Comment on lines +18 to +21
uses: coderabbitai/openai-pr-reviewer@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow excerpt =="
sed -n '1,80p' .github/workflows/ai-review.yml 2>/dev/null || true

echo
echo "== references to action and permissions/secrets =="
rg -n "coderabbitai/openai-pr-reviewer|GITHUB_TOKEN|OPENAI_API_KEY|permissions:|pull-requests|contents|id-token|GITHUB_TOKEN" .github/workflows/ai-review.yml || true

echo
echo "== GitHub API resolve for coderabbitai/openai-pr-reviewer refs/tags/latest =="
tmpdir="$(mktemp -d)"
cd "$tmpdir"
if command -v gh >/dev/null 2>&1; then
  echo "gh available"
  gh api repos/coderabbitai/openai-pr-reviewer/git/ref/tags/latest --jq '{ref, object_type: .object.type, object_sha: .object.sha}' || true
  latest_sha="$(gh api repos/coderabbitai/openai-pr-reviewer/git/ref/tags/latest --jq '.object.sha')" || true
  echo "latest ref object sha: $latest_sha"
  if [ -n "$latest_sha" ]; then
    obj_type="$(gh api repos/coderabbitai/openai-pr-reviewer/git/tags/${latest_sha} --jq '.type' 2>/dev/null || true)"
    echo "tag object type: $obj_type"
    if [ "$obj_type" = "tag" ]; then
      deref="$(gh api repos/coderabbitai/openai-pr-reviewer/git/tags/${latest_sha} --jq '.object.sha')" || true
      echo "dereferenced commit sha: $deref"
      gh api repos/coderabbitai/openai-pr-reviewer/commits/${deref} >/dev/null && echo "dereferenced commit exists" || echo "dereferenced commit missing"
    elif [ "$obj_type" = "commit" ]; then
      echo "lightweight commit object exists"
      gh api repos/coderabbitai/openai-pr-reviewer/commits/${latest_sha} >/dev/null && echo "latest object commit exists" || echo "latest object commit missing"
    else
      echo "unexpected tag object type"
    fi
  fi
else
  echo "gh not available"
fi

echo
echo "== available workflow files listing =="
git ls-files '.github/workflows/*'

Repository: NITISH-R-G/ev-grid-oracle

Length of output: 1457


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow excerpt =="
sed -n '1,120p' .github/workflows/ai-review.yml 2>/dev/null || true

echo
echo "== references to action and permissions/secrets =="
rg -n "coderabbitai/openai-pr-reviewer|GITHUB_TOKEN|OPENAI_API_KEY|permissions:|pull-requests|contents|id-token|GITHUB_TOKEN" .github/workflows/ai-review.yml || true

echo
echo "== GitHub API resolve for coderabbitai/openai-pr-reviewer refs/tags/latest =="
tmpdir="$(mktemp -d)"
cd "$tmpdir"
if command -v gh >/dev/null 2>&1; then
  echo "gh available"
  gh api repos/coderabbitai/openai-pr-reviewer/git/ref/tags/latest --jq '{ref, object_type: .object.type, object_sha: .object.sha}' || true
  latest_sha="$(gh api repos/coderabbitai/openai-pr-reviewer/git/ref/tags/latest --jq '.object.sha')" || true
  echo "latest ref object sha: $latest_sha"
  if [ -n "$latest_sha" ]; then
    obj_type="$(gh api repos/coderabbitai/openai-pr-reviewer/git/tags/${latest_sha} --jq '.type' 2>/dev/null || true)"
    echo "tag object type: $obj_type"
    if [ "$obj_type" = "tag" ]; then
      deref="$(gh api repos/coderabbitai/openai-pr-reviewer/git/tags/${latest_sha} --jq '.object.sha')" || true
      echo "dereferenced commit sha: $deref"
      gh api repos/coderabbitai/openai-pr-reviewer/commits/${deref} >/dev/null && echo "dereferenced commit exists" || echo "dereferenced commit missing"
    elif [ "$obj_type" = "commit" ]; then
      echo "lightweight commit object exists"
      gh api repos/coderabbitai/openai-pr-reviewer/commits/${latest_sha} >/dev/null && echo "latest object commit exists" || echo "latest object commit missing"
    else
      echo "unexpected tag object type"
    fi
  fi
else
  echo "gh not available"
fi

echo
echo "== available workflow files listing =="
git ls-files '.github/workflows/*'

Repository: NITISH-R-G/ev-grid-oracle

Length of output: 1457


Pin the third-party action to an immutable commit.

This workflow runs in pull_request/issue_comment context and passes GITHUB_TOKEN and OPENAI_API_KEY. coderabbitai/openai-pr-reviewer@latest is a mutable ref; replace it with a reviewed full commit SHA while keeping the release tag in a comment.

Proposed action reference
-        uses: coderabbitai/openai-pr-reviewer@latest
+        uses: coderabbitai/openai-pr-reviewer@<40-character-reviewed-commit-sha> # vX.Y.Z
🧰 Tools
🪛 zizmor (1.29.0)

[error] 18-18: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ai-review.yml around lines 18 - 21, Update the action
reference in the workflow step using coderabbitai/openai-pr-reviewer so it
points to a reviewed full commit SHA instead of the mutable latest tag, and
retain the corresponding release tag in an inline comment for traceability.
Leave the existing environment variables and workflow behavior unchanged.

Source: Linters/SAST tools

Comment thread .github/workflows/ci.yml
Comment on lines +13 to +16
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Do not persist checkout credentials.

These jobs do not need Git credentials after checkout. CI only installs and runs tests. CodeQL uses its own GitHub Actions token context. Pages passes tokens directly to its download and deployment actions. Set persist-credentials: false to prevent later commands or actions from reading the token from Git configuration.

  • .github/workflows/ci.yml#L13-L16: add persist-credentials: false.
  • .github/workflows/codeql.yml#L32-L35: add persist-credentials: false.
  • .github/workflows/pages.yml#L17-L20: add persist-credentials: false.
🧰 Tools
🪛 zizmor (1.29.0)

[warning] 13-16: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[error] 14-14: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

📍 Affects 3 files
  • .github/workflows/ci.yml#L13-L16 (this comment)
  • .github/workflows/codeql.yml#L32-L35
  • .github/workflows/pages.yml#L17-L20
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 13 - 16, Disable persisted checkout
credentials by adding persist-credentials: false to the Checkout repository
steps in .github/workflows/ci.yml lines 13-16, .github/workflows/codeql.yml
lines 32-35, and .github/workflows/pages.yml lines 17-20.

Source: Linters/SAST tools

Comment thread .github/workflows/ci.yml
Comment on lines +14 to +19
uses: actions/checkout@v4
with:
lfs: true

- name: Set up Python
uses: actions/setup-python@v5

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

while read -r repository tag; do
  printf '%s@%s = ' "$repository" "$tag"
  gh api "repos/$repository/commits/$tag" --jq '.sha'
done <<'EOF'
actions/checkout v4
actions/setup-python v5
github/codeql-action/init v3
github/codeql-action/analyze v3
actions/first-interaction v1
actions/labeler v5
actions/download-artifact v4
peaceiris/actions-gh-pages v4
actions/stale v9
EOF

Repository: NITISH-R-G/ev-grid-oracle

Length of output: 455


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "workflow usages:"
rg -n 'uses:\s*[^[:space:]]+' .github/workflows || true

echo
echo "git refs for relevant tags:"
for ref in refs/tags/v4 refs/tags/v5 refs/tags/v3 refs/tags/v2 refs/tags/v1; do
  git cat-file -t "$ref" 2>/dev/null && git rev-parse "$ref"
done

Repository: NITISH-R-G/ev-grid-oracle

Length of output: 2386


🌐 Web query:

github/codeql-action GitHub repository v3 tag

💡 Result:

The github/codeql-action repository maintains a v3 release series, which is currently supported alongside the newer v4 series [1][2]. The v3 tag is not a single point-in-time release but rather a major version branch that receives ongoing updates, bug fixes, and feature improvements [1][2]. Key details regarding CodeQL Action v3 include: - Purpose: The CodeQL Action series (v2, v3, v4) differentiates between underlying Node.js runtime versions [3][4]. Specifically, v3 runs on Node 20 [3][4]. - Usage: GitHub recommends that users reference the major version tag (e.g., @v3 or @v4) in their workflow files to automatically receive the latest updates, patches, and CodeQL CLI version improvements within that major version [1][2]. - Versioning: Individual releases within the v3 series follow semantic versioning, such as v3.37.4 [5][6]. - Support Status: v3 remains a supported major version [1][2]. GitHub typically advises using the latest major version (currently v4) for new setups, while existing workflows can continue using v3 [1][2]. To see the specific releases available within the v3 series, you can view the official releases page of the repository [5].

Citations:


Pin all GitHub Actions to immutable commits.

Mutable tags can switch to different action code without a repository change. Pin each uses: reference to a reviewed full commit SHA, including the CodeQL actions and the repository-scoped references in .github/workflows/repo-maintenance.yml, .github/workflows/ai-review.yml, .github/workflows/security.yml, and .github/workflows/health-dashboard.yml.

🧰 Tools
🪛 zizmor (1.29.0)

[error] 14-14: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)


[error] 19-19: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

📍 Affects 6 files
  • .github/workflows/ci.yml#L14-L19 (this comment)
  • .github/workflows/codeql.yml#L32-L44
  • .github/workflows/greetings.yml#L17-L17
  • .github/workflows/labeler.yml#L14-L14
  • .github/workflows/pages.yml#L18-L31
  • .github/workflows/stale.yml#L15-L15
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 14 - 19, Pin every GitHub Actions uses
reference to a reviewed full commit SHA instead of a mutable tag or branch.
Apply this to all action references in .github/workflows/ci.yml (lines 14-19),
.github/workflows/codeql.yml (lines 32-44), .github/workflows/greetings.yml
(line 17), .github/workflows/labeler.yml (line 14), .github/workflows/pages.yml
(lines 18-31), and .github/workflows/stale.yml (line 15), including CodeQL and
repository-scoped actions; also update the repository-scoped references in
.github/workflows/repo-maintenance.yml, .github/workflows/ai-review.yml,
.github/workflows/security.yml, and .github/workflows/health-dashboard.yml.

Source: Linters/SAST tools

Comment on lines +7 to +13
Hackathon requirement: committed plots from a *real* GRPO run. After `trainer.train()` in
`training/train_grpo.ipynb`, copy `ev_oracle_grpo_road/` from Colab (or run locally), then:

pip install tensorboard matplotlib
python tools/export_grpo_tensorboard_plots.py --logdir ev_oracle_grpo_road --out-dir artifacts

Writes e.g. artifacts/grpo_loss.png and artifacts/grpo_reward.png (filenames depend on tags found).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Render the shell commands as a code block.

Lines 10-11 use two-space indentation. Use a fenced bash block or four-space indentation in the source module docstring. Then regenerate this page so users can copy the commands reliably.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/api/tools_export_grpo_tensorboard_plots.md` around lines 7 - 13, Format
the pip install and export commands in
docs/api/tools_export_grpo_tensorboard_plots.md as a fenced bash code block (or
consistently indented code block), then regenerate the documentation page so the
rendered commands are copyable.

Comment thread tools/docs_sync.py
Comment on lines +21 to +28
# Create a path-safe filename to prevent collisions (e.g., server_app.md instead of just app.md)
rel_dir = os.path.relpath(dirpath, root_dir)
if rel_dir == ".":
safe_filename = file.replace(".py", ".md")
else:
safe_filename = f"{rel_dir.replace(os.sep, '_')}_{file.replace('.py', '.md')}"

doc_path = os.path.join("docs/api", safe_filename)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use a collision-free output path.

foo/bar_baz.py and foo_bar/baz.py both produce foo_bar_baz.md. The later traversal overwrites the earlier API page. Preserve the relative directory structure under docs/api instead of joining path components with underscores.

Proposed fix
-                    rel_dir = os.path.relpath(dirpath, root_dir)
-                    if rel_dir == ".":
-                        safe_filename = file.replace(".py", ".md")
-                    else:
-                        safe_filename = f"{rel_dir.replace(os.sep, '_')}_{file.replace('.py', '.md')}"
-
-                    doc_path = os.path.join("docs/api", safe_filename)
+                    rel_path = os.path.relpath(filepath, root_dir)
+                    doc_path = os.path.join(
+                        "docs/api", os.path.splitext(rel_path)[0] + ".md"
+                    )
+                    os.makedirs(os.path.dirname(doc_path), exist_ok=True)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/docs_sync.py` around lines 21 - 28, Update the output-path construction
in the documentation sync flow around rel_dir and doc_path to preserve the
relative directory structure under docs/api instead of flattening directories
with underscores. Build doc_path from the relative source directory and the
converted Markdown filename so distinct modules such as foo/bar_baz.py and
foo_bar/baz.py cannot overwrite each other.

Comment thread tools/docs_sync.py
Comment on lines +37 to +47
for node in ast.walk(tree):
if isinstance(node, ast.ClassDef):
doc_file.write(f"### Class: `{node.name}`\n\n")
class_doc = ast.get_docstring(node)
if class_doc:
doc_file.write(f"{class_doc}\n\n")
elif isinstance(node, ast.FunctionDef):
doc_file.write(f"### Function: `{node.name}`\n\n")
func_doc = ast.get_docstring(node)
if func_doc:
doc_file.write(f"{func_doc}\n\n")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Generate level-2 API headings.

The generator writes ### headings directly after the document H1 when a module has no docstring. This produces MD001 violations in generated pages such as docs/api/tests_test_parsing.md. Write ## Class and ## Function headings, then regenerate docs/api.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/docs_sync.py` around lines 37 - 47, Update the heading levels emitted
by the AST traversal in tools/docs_sync.py: change the ClassDef and FunctionDef
headings from level 3 to level 2 so generated API pages remain hierarchically
valid when modules lack docstrings, then regenerate the docs/api output.

Source: Linters/SAST tools

Comment thread tools/docs_sync.py
Comment on lines +48 to +49
except Exception as e:
print(f"Error parsing {filepath}: {e}")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Fail generation when a source file cannot be processed.

Both generators print an error and exit successfully. Scheduled maintenance can then commit incomplete documentation or a partial knowledge graph.

  • tools/docs_sync.py#L48-L49: collect read, parse, and write failures, then raise after traversal.
  • tools/generate_knowledge_graph.py#L52-L53: collect read and parse failures, then raise before writing docs/knowledge_graph.json.
📍 Affects 2 files
  • tools/docs_sync.py#L48-L49 (this comment)
  • tools/generate_knowledge_graph.py#L52-L53
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/docs_sync.py` around lines 48 - 49, Update tools/docs_sync.py lines
48-49 to collect read, parse, and write failures during traversal, continue
processing remaining files, and raise an aggregated failure after traversal
instead of only printing errors. In tools/generate_knowledge_graph.py lines
52-53, collect read and parse failures and raise them before writing
docs/knowledge_graph.json, ensuring both generators exit unsuccessfully when any
source file cannot be processed.

Comment on lines +27 to +51
for node in ast.walk(tree):
if isinstance(node, ast.ClassDef):
class_id = f"{filepath}::{node.name}"
graph["nodes"].append(
{"id": class_id, "type": "class", "label": node.name}
)
graph["edges"].append(
{
"source": filepath,
"target": class_id,
"relation": "contains",
}
)
elif isinstance(node, ast.FunctionDef):
func_id = f"{filepath}::{node.name}"
graph["nodes"].append(
{"id": func_id, "type": "function", "label": node.name}
)
graph["edges"].append(
{
"source": filepath,
"target": func_id,
"relation": "contains",
}
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Model lexical containment and unique node IDs.

ast.walk visits class methods and nested functions, but this code connects every function to filepath. It also uses filepath::{node.name} for every function ID. Two classes with a method of the same name produce duplicate IDs, and methods are not connected to their containing class.

Traverse the AST recursively. Include the enclosing class or function path in each node ID. Connect a method node to its class node.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/generate_knowledge_graph.py` around lines 27 - 51, Update the AST
traversal around the class/function handling to recurse with a lexical ancestor
path instead of using ast.walk directly. Build each class and function ID from
filepath plus its enclosing class/function names, connect nested definitions to
their immediate containing node (including methods to their class), and retain
the filepath edge only for top-level definitions.

…lities

- Setup community guidelines and templates
- Configure AI PR reviewer action
- Configure stale issues and greetings automations
- Configure PR labeler based on file paths
- Add codeql security analysis workflow
- Add unified repo-maintenance workflow for formatting, linting, docs, kg, and sboms
- Create ast-based automated docs syncing tool
- Create ast-based automated knowledge graph generation tool
- Setup dependabot for pip, npm, and gh-actions
- Separate GitHub Pages deployment into its own workflow
- Configure robust testing CI

Co-authored-by: NITISH-R-G <225521762+NITISH-R-G@users.noreply.github.com>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

…lities

- Setup community guidelines and templates
- Configure AI PR reviewer action using Codium-ai/pr-agent
- Configure stale issues and greetings automations
- Configure PR labeler based on file paths
- Add codeql security analysis workflow
- Add unified repo-maintenance workflow for formatting, linting, docs, kg, and sboms
- Create ast-based automated docs syncing tool
- Create ast-based automated knowledge graph generation tool
- Setup dependabot for pip, npm, and gh-actions
- Separate GitHub Pages deployment into its own workflow
- Configure robust testing CI

Co-authored-by: NITISH-R-G <225521762+NITISH-R-G@users.noreply.github.com>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

…lities

- Setup community guidelines and templates
- Configure AI PR reviewer action using coderabbitai/ai-pr-reviewer
- Configure stale issues and greetings automations
- Configure PR labeler based on file paths
- Add codeql security analysis workflow
- Add unified repo-maintenance workflow for formatting, linting, docs, kg, and sboms
- Create ast-based automated docs syncing tool
- Create ast-based automated knowledge graph generation tool
- Setup dependabot for pip, npm, and gh-actions
- Separate GitHub Pages deployment into its own workflow
- Configure robust testing CI

Co-authored-by: NITISH-R-G <225521762+NITISH-R-G@users.noreply.github.com>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

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

Labels

ci documentation Improvements or additions to documentation tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant