Conversation
There was a problem hiding this comment.
Pull request overview
Updates repository agent documentation and modifies the SQL ordering used when exporting cast ballots for a given area/election (used by the windmill ceremony flow).
Changes:
- Changed
find_area_ballotsSQL to order results only byvoter_id_string. - Reframed
AGENTS.mdas a shared handbook for multiple AI coding agents and added pointers to Copilot-specific instructions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/windmill/src/services/cast_votes.rs | Alters DISTINCT ON query ordering for exported ballots (currently introduces a Postgres DISTINCT ON/ORDER BY mismatch and changes which ballot row is selected). |
| AGENTS.md | Updates agent guidance text and formatting; adds references to Copilot instruction files (currently points to paths that don’t exist). |
Comments suppressed due to low confidence (2)
AGENTS.md:7
- This references
.github/copilot-instructions.mdand.github/instructions/*.instructions.md, but those paths don’t exist in the repository (current.github/only containscla/,dependabot.yml, andworkflows/). Either add the referenced instruction files or update this sentence to point at the actual location of Copilot/agent review guidance.
AGENTS.md:120 - The fenced code block under the "REUSE license headers" bullet is indented with tabs. This can render inconsistently in Markdown and introduces mixed whitespace; prefer spaces (or no indentation) to match the rest of the file’s formatting.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| SELECT DISTINCT ON (election_id, voter_id_string) | ||
| voter_id_string, | ||
| content | ||
| FROM "sequent_backend".cast_vote | ||
| WHERE | ||
| tenant_id = '{tenant_id}' AND | ||
| election_event_id = '{election_event_id}' AND | ||
| area_id = '{area_id}' AND | ||
| election_id = '{election_id}' | ||
| ORDER BY election_id, voter_id_string, created_at DESC | ||
| ORDER BY voter_id_string | ||
| "# |
There was a problem hiding this comment.
Pull request overview
This PR adds repository guidance for AI coding/review agents (Copilot + other tools) and introduces scoped review instruction files, while also changing ballot export ordering in windmill’s find_area_ballots query.
Changes:
- Add
.github/copilot-instructions.mdand scoped.github/instructions/*.instructions.mdguidance for high-risk review areas (tally, auth/tenancy, schema IO, crypto/audit). - Update
AGENTS.mdto be the shared agent handbook and reference Copilot-specific instruction locations. - Modify
packages/windmill/src/services/cast_votes.rsSQLORDER BYforfind_area_ballots.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/windmill/src/services/cast_votes.rs | Changes DISTINCT ON query ordering used for area ballot export (high risk to tally semantics / runtime correctness). |
| AGENTS.md | Renames/reframes agent handbook and points reviewers to Copilot instruction files. |
| .github/copilot-instructions.md | Adds top-level Copilot review mindset for election-system invariants and risk areas. |
| .github/instructions/tally.instructions.md | Adds tally/ballot-selection specific review checklist and invariants. |
| .github/instructions/schema-io.instructions.md | Adds schema/migrations/import/export review checklist. |
| .github/instructions/crypto-audit.instructions.md | Adds crypto/audit critical review checklist. |
| .github/instructions/auth-tenancy.instructions.md | Adds authorization/tenancy boundary review checklist. |
Comments suppressed due to low confidence (1)
AGENTS.md:120
- The fenced code block under the REUSE header list item is indented with tab characters. Tabs can render inconsistently across Markdown viewers and may violate formatting/lint expectations; use spaces for indentation (or no indentation) so the code fence is stable and consistent with the rest of the document.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
This PR adds repository guidance for AI coding agents and introduces GitHub Copilot review instruction files intended to focus reviews on election-system correctness, security, and auditability.
Changes:
- Replaces/updates the agent handbook content in
AGENTS.mdto cover multiple AI agents and point to Copilot-specific review guidance. - Adds
.github/copilot-instructions.mdwith high-level Copilot review priorities for this repo. - Adds scoped, path-targeted review checklists under
.github/instructions/*.instructions.md.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| AGENTS.md | Updates the shared AI-agent handbook and references the new Copilot instruction locations. |
| .github/copilot-instructions.md | Adds high-level Copilot PR review guidance tailored to election software risk areas. |
| .github/instructions/tally.instructions.md | Adds targeted review checklist for tally/ballot-selection paths. |
| .github/instructions/schema-io.instructions.md | Adds targeted review checklist for schema/migrations/import/export changes. |
| .github/instructions/crypto-audit.instructions.md | Adds targeted review checklist for crypto and audit-critical areas. |
| .github/instructions/auth-tenancy.instructions.md | Adds targeted review checklist for authorization and tenant boundary changes. |
Comments suppressed due to low confidence (2)
AGENTS.md:5
- AGENTS.md currently lacks an SPDX license header comment at the top of the file (unlike other Markdown docs such as README.md). Given the repo’s REUSE guidance, add an HTML comment SPDX header before the first heading so REUSE/lint expectations are met consistently.
AGENTS.md:120 - The fenced code block under the REUSE header example is indented with tab characters. This is inconsistent with the rest of the Markdown code fences in this file and can render oddly in some viewers; remove the tabs (or use consistent spaces) so the code fence and its contents align with surrounding formatting.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -0,0 +1,19 @@ | |||
| --- | |||
| applyTo: "packages/windmill/src/services/cast_votes.rs,packages/windmill/src/services/insert_cast_vote.rs,packages/windmill/src/services/join.rs,packages/windmill/src/services/ceremonies/**/*.rs,packages/windmill/src/postgres/cast_vote.rs,beyond/packages/ballot-audit/**/*.rs,packages/step-cli/src/commands/duplicate_votes.rs" | |||
|
|
||
| ## System Mindset | ||
|
|
||
| - Treat changes in packages/windmill, packages/sequent-core, packages/harvest, packages/immu-board, packages/keycloak-extensions, packages/voting-portal, packages/admin-portal, and beyond/packages/ballot-audit as high risk. |
Parent issue: https://github.com/sequentech/meta/issues/11563