Build for 2026-04-19 parliamentary election#269
Merged
Conversation
Adds operational scripts, seed pipeline updates, and CLAUDE.md notes used to rebuild sections/parties/organizations for the new cycle: - scripts/update-parties-orgs.sql: parties and organizations for NS 19.04.2026 - scripts/reset-sections.sh: truncate geo/parties/people FKs, reseed - scripts/carryover-people.sql: dblink import from prior DB, deduped - scripts/sections-preprocess/build_sections_csv.py: regenerates sections.csv from CIK xlsx files (canonical ER names, abroad cleanup, machine count) - scripts/test-sections-seed.sql: dry-run the seed SQL locally - src/seeds/nullify.sql: template for wiping cycle data - src/seeds/1607202587052-Sections.ts: point seed at src/seeds/sections.csv and derive is_machine from machines_count - protocols.repository.ts: left join results so protocols without results still appear in the listing - package.json: widen engines to node <21/npm <13, switch typeorm scripts to typeorm-ts-node-commonjs (ESM loader incompatible with commonjs config), prebuild before seed:run so dist/seeds/*.csv is available - docker-compose.yml: drop obsolete compose file version - CLAUDE.md: operational notes for pm2 env refresh, election rebuild pipeline, npm script gotchas, staging/prod DB moves - Remove stale 2021/2023 seed placeholders Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Support camelCase `cityRegion` as a fallback for the documented `city_region` query parameter on GET /sections, so older clients that send the camelCase variant still get correct filtering. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Upgrade @nestjs/cli from 9 to 10 (v9 used removed `util.isObject`) - Upgrade @nestjs/swagger from 6 to 7 (required by CLI 10 plugin) - Fix always-truthy condition in violation.entity.ts `publish()` method (missing `.includes(this.status)`, caught by newer TypeScript) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
city_region(snake_case, documented) andcityRegion(camelCase) query params onGET /sectionsfor backwards compatibility with older clients@nestjs/clito v10 and@nestjs/swaggerto v7 (util.isObjectwas removed in Node 22)Violation.publish()— was missing.includes(this.status)Test plan
GET /sections?town=68134&city_region=02returns ~93 sections (Красно Село)GET /sections?town=68134&cityRegion=02returns the same ~93 sectionsnpm run buildsucceeds on Node.js 22+🤖 Generated with Claude Code