Skip to content

Comments

📰 Weekly Review: Feb 15-22 2026 Parliamentary Activity (14 languages)#433

Merged
pethers merged 41 commits intomainfrom
news-generation/weekly-review-2026-02-22-25732d3df5a3d00f
Feb 22, 2026
Merged

📰 Weekly Review: Feb 15-22 2026 Parliamentary Activity (14 languages)#433
pethers merged 41 commits intomainfrom
news-generation/weekly-review-2026-02-22-25732d3df5a3d00f

Conversation

@github-actions
Copy link
Contributor

📰 Weekly Review: February 15-22, 2026

Summary

Automated weekly review covering parliamentary activity from Feb 15-22, 2026.

Data Analyzed

  • 30 committee reports (betänkanden) from NU, SfU, CU committees
  • 13 government propositions from Justice, Finance, Defence, Climate departments
  • 8 opposition motions responding to various propositions

Key Topics

  • Migration and citizenship reform (Prop. 2025/26:116)
  • Nuclear energy policy (CU committee)
  • Social insurance reforms (SfU committee)
  • Weapons law amendments (Prop. 2025/26:117)
  • Ukraine support budget (Prop. 2025/26:120)
  • Macroprudential supervision development (Prop. 2025/26:119)

Languages

All 14 languages: EN, SV, DA, NO, FI, DE, FR, ES, NL, AR, HE, JA, KO, ZH

Bug Fixes

  • scripts/mcp-client.ts: Fixed searchDocuments() to use dokument field name (Swedish API returns dokument not documents)
  • scripts/news-types/weekly-review.ts: Rewrote data fetching to use specific MCP tools (fetchCommitteeReports, fetchPropositions, fetchMotions) instead of generic search_dokument which returned mixed record types

Files Changed

  • 14 new article files (news/2026-02-22-weekly-review-*.html)
  • 14 updated news index files
  • Updated data/news-articles.json, sitemap.xml
  • Updated news/metadata/last-generation.json
  • Bug fixes in scripts/mcp-client.ts and scripts/news-types/weekly-review.ts

Generated by News: Article Generator (Manual)

Generate weekly-review articles covering Feb 15-22 parliamentary activity:
- 30 committee reports (NU, SfU, CU committees)
- 13 government propositions (Justice, Finance, Defence, Climate)
- 8 opposition motions (responding to props 118-121)

Key topics: migration/citizenship reform, nuclear energy, social insurance,
weapons law amendments, Ukraine support budget, macroprudential supervision.

Bug fixes:
- mcp-client.ts: Fix searchDocuments() to use 'dokument' field (Swedish API)
- weekly-review.ts: Use specific MCP tools (betänkanden, propositioner,
  motioner) instead of generic search_dokument

Articles generated in all 14 languages with full translation post-processing.

Co-authored-by: Copilot <[email protected]>
@github-actions
Copy link
Contributor Author

✅ Pull request created: #433

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request generates a weekly review news article covering Swedish parliamentary activity from February 15-22, 2026, in 14 languages. The PR includes important bug fixes to the MCP client's document search functionality and rewrites the weekly review data fetching logic to use specific MCP tools rather than generic search.

Changes:

  • Fixed searchDocuments() in MCP client to handle Swedish API field name (dokument instead of documents)
  • Rewrote weekly review data fetching to use fetchCommitteeReports, fetchPropositions, and fetchMotions for cleaner type handling
  • Generated 14 weekly review article HTML files (one per language)
  • Updated all 14 news index files with new article entries
  • Updated metadata files and news articles registry

Reviewed changes

Copilot reviewed 33 out of 34 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/mcp-client.ts Added fallback to handle both 'dokument' and 'documents' field names from Swedish API
scripts/news-types/weekly-review.ts Rewrote to fetch specific document types via dedicated MCP methods with date filtering
news/metadata/last-generation.json Simplified structure for weekly review generation tracking
news/metadata/batch-status.json ISSUE: Shows only 4 languages completed despite 14 being generated
news/index*.html (14 files) Added new weekly review article to each language's news index
news/2026-02-22-weekly-review-*.html (14 files) New article HTML files with proper structure and i18n
data/news-articles.json Updated registry with 15 new article entries (14 weekly review + 1 missing Hebrew article)

Comment on lines 3 to 14
"completedLanguages": [
"en",
"sv",
"da",
"no",
"fi",
"de",
"fr",
"es",
"nl",
"ar",
"he",
"ja",
"ko",
"zh"
],
"remainingLanguages": [],
"allRequestedLanguages": [
"en",
"sv",
"da",
"no",
"fi",
"de",
"fr",
"es",
"nl",
"ar",
"he",
"ja",
"ko",
"zh"
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

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

The batch-status.json file shows only 4 completed languages (he, ja, ko, zh) but the PR description and all other evidence indicates 14 languages were successfully generated. This is inconsistent with the fact that:

  1. 14 article HTML files were created (en, sv, da, no, fi, de, fr, es, nl, ar, he, ja, ko, zh)
  2. All 14 language index files were updated
  3. The last-generation.json shows 14 languages
  4. The PR title claims "14 languages"

This metadata file should list all 14 languages in completedLanguages and allRequestedLanguages arrays.

Copilot uses AI. Check for mistakes.
Comment on lines 121 to 123
for (const d of recentReports) (d as Record<string, string>).doktyp = (d as Record<string, string>).doktyp || 'bet';
for (const d of recentPropositions) (d as Record<string, string>).doktyp = (d as Record<string, string>).doktyp || 'prop';
for (const d of recentMotions) (d as Record<string, string>).doktyp = (d as Record<string, string>).doktyp || 'mot';
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

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

The doktyp tagging logic explicitly sets doktyp on documents that may already have it. Lines 121-123 use the pattern d.doktyp || 'bet' which means: "if doktyp doesn't exist, set it to 'bet'". However, the code unconditionally assigns to doktyp even when the document might already have the correct type from the API.

Consider changing to only set doktyp when it's actually missing:

if (!d.doktyp) (d as Record&lt;string, string&gt;).doktyp = 'bet';

This would be safer and more explicit about the intention.

Copilot uses AI. Check for mistakes.
@pethers
Copy link
Member

pethers commented Feb 22, 2026

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Contributor

Copilot AI commented Feb 22, 2026

@pethers I've opened a new pull request, #434, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits February 22, 2026 11:17
fix: correct batch-status.json languages and weekly-review doktyp guard
@pethers pethers requested a review from Copilot February 22, 2026 11:22
@github-actions github-actions bot added html-css HTML/CSS changes i18n Internationalization/localization translation Translation updates rtl RTL language support (Arabic, Hebrew) deployment Deployment configuration refactor Code refactoring news News articles and content generation size-xl Extra large change (> 1000 lines) labels Feb 22, 2026
@github-actions
Copy link
Contributor Author

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 33 out of 34 changed files in this pull request and generated 1 comment.

Comment on lines 103 to 107
const [reports, propositions, motions] = await Promise.all([
client.fetchCommitteeReports(30, '2025/26').catch(() => [] as unknown[]),
client.fetchPropositions(30, '2025/26').catch(() => [] as unknown[]),
client.fetchMotions(30, '2025/26').catch(() => [] as unknown[]),
]);
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

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

Silent error swallowing in catch blocks could hide API failures. The empty catch blocks on lines 104-106 return empty arrays without logging errors, making it difficult to diagnose API or network failures in production. Consider logging errors before returning empty arrays, for example: .catch((err) => { console.error('Failed to fetch committee reports:', err); return [] as unknown[]; })

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor Author

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

@pethers
Copy link
Member

pethers commented Feb 22, 2026

@copilot open a new pull request to apply changes based on the comments in this thread

and fix
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 7 ⎯⎯⎯⎯⎯⎯⎯

FAIL tests/news-types/weekly-review.test.ts > Weekly Review Article Generation > Data Collection > should fetch documents from MCP
AssertionError: expected "vi.fn()" to be called at least once
❯ tests/news-types/weekly-review.test.ts:121:50
119| });
120|
121| expect(mockClientInstance.searchDocuments).toHaveBeenCalled();
| ^
122| expect(result.mcpCalls!.some((call: MCPCallRecord) => call.tool …
123| });

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/7]⎯

FAIL tests/news-types/weekly-review.test.ts > Weekly Review Article Generation > Data Collection > should handle empty documents
AssertionError: expected false to be true // Object.is equality

  • Expected
  • Received
  • true
  • false

❯ tests/news-types/weekly-review.test.ts:132:30
130| });
131|
132| expect(result.success).toBe(true);
| ^
133| expect(result.files).toBe(0);
134| });

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/7]⎯

FAIL tests/news-types/weekly-review.test.ts > Weekly Review Article Generation > Article Structure > should generate articles for requested languages
AssertionError: expected false to be true // Object.is equality

  • Expected
  • Received
  • true
  • false

❯ tests/news-types/weekly-review.test.ts:143:30
141| });
142|
143| expect(result.success).toBe(true);
| ^
144| expect(result.files).toBe(3);
145| expect(result.articles.length).toBe(3);

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/7]⎯

FAIL tests/news-types/weekly-review.test.ts > Weekly Review Article Generation > Article Structure > should include correct slug format
TypeError: .toMatch() expects to receive a string, but got undefined
❯ tests/news-types/weekly-review.test.ts:153:27
151| });
152|
153| expect(result.slug).toMatch(/^\d{4}-\d{2}-\d{2}-weekly-review$/);
| ^
154| });
155| });

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/7]⎯

FAIL tests/news-types/weekly-review.test.ts > Weekly Review Article Generation > Multi-Language > should generate language-specific titles
TypeError: Cannot read properties of undefined (reading 'find')
❯ tests/news-types/weekly-review.test.ts:181:41
179| });
180|
181| const enArticle = result.articles.find((a: GeneratedArticle) => …
| ^
182| const svArticle = result.articles.find((a: GeneratedArticle) => …
183|

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/7]⎯

FAIL tests/news-types/weekly-review.test.ts > Weekly Review Article Generation > Integration with Writer > should call writeArticle function if provided
AssertionError: expected "vi.fn()" to be called at least once
❯ tests/news-types/weekly-review.test.ts:213:26
211| });
212|
213| expect(mockWriter).toHaveBeenCalled();
| ^
214| });
215|

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[6/7]⎯

FAIL tests/news-types/weekly-review.test.ts > Weekly Review Article Generation > Integration with Writer > should work without writeArticle function
AssertionError: expected false to be true // Object.is equality

  • Expected
  • Received
  • true
  • false

❯ tests/news-types/weekly-review.test.ts:221:30
219| });
220|
221| expect(result.success).toBe(true);
| ^
222| expect(result.articles.length).toBe(1);
223| });

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[7/7]⎯

Test Files 1 failed | 38 passed (39)
Tests 7 failed | 1579 passed (1586)
Start at 11:23:14
Duration 17.45s (transform 859ms, setup 297ms, import 1.02s, tests 24.21s, environment 1.50s)

Also want to improve/extend it should get all the last weeks documents and anayse them completly.

Need to analyse every single document complely. still to much list based and not much enough political analyst, intelligence op perspective. no edge, Analyse produce articles, english is enough sample

cia-data exist single person motion is for example 99+ % of being denied. many csv will provide context and history of trends in general (may not be updated weekly, but distribution,percentages stats hold)

Copy link
Contributor

Copilot AI commented Feb 22, 2026

@pethers I've opened a new pull request, #435, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Feb 22, 2026

@pethers I've opened a new pull request, #443, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits February 22, 2026 17:33
…ahead REQUIRED_TOOLS comment + regen indexes

Co-authored-by: pethers <[email protected]>
fix: mcp-client json resilience, monthly-review step docs, month-ahead REQUIRED_TOOLS conditional annotation
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 47 out of 131 changed files in this pull request and generated no new comments.

@pethers
Copy link
Member

pethers commented Feb 22, 2026

@copilot merge all changes in this branch with main branch, so all merge conflicts are resolved and all news/index and meta data complete

This branch has conflicts that must be resolved
Use the command line to resolve conflicts before continuing.

data/news-articles.json
news/index.html
news/index_ar.html
news/index_da.html
news/index_de.html
news/index_es.html
news/index_fi.html
news/index_fr.html
news/index_he.html
news/index_ja.html
news/index_ko.html
news/index_nl.html
news/index_no.html
news/index_sv.html
news/index_zh.html
news/metadata/last-generation.json
sitemap.xml

Copy link
Contributor

Copilot AI commented Feb 22, 2026

@pethers I've opened a new pull request, #444, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 3 commits February 22, 2026 18:12
…cles and regenerate all indexes

Co-authored-by: pethers <[email protected]>
…spective keywords to prevent false positives

Co-authored-by: pethers <[email protected]>
fix: resolve merge conflicts with main - integrate weekend articles and fix prospective keyword false positives
@pethers
Copy link
Member

pethers commented Feb 22, 2026

@copilot merge all changes in this branch with main branch, so all merge conflicts are resolved and all news/index and meta data complete

Prio 1, make sure this branch can be merged without conflicts. do it,

This branch has conflicts that must be resolved
Use the command line to resolve conflicts before continuing.

data/news-articles.json
news/index.html
news/index_ar.html
news/index_da.html
news/index_de.html
news/index_es.html
news/index_fi.html
news/index_fr.html
news/index_he.html
news/index_ja.html
news/index_ko.html
news/index_nl.html
news/index_no.html
news/index_sv.html
news/index_zh.html
news/metadata/last-generation.json
sitemap.xml

Copy link
Contributor

Copilot AI commented Feb 22, 2026

@pethers I've opened a new pull request, #445, to work on those changes. Once the pull request is ready, I'll request review from you.

@github-actions
Copy link
Contributor Author

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 47 out of 131 changed files in this pull request and generated no new comments.

@pethers pethers merged commit 71127ea into main Feb 22, 2026
25 checks passed
@pethers pethers deleted the news-generation/weekly-review-2026-02-22-25732d3df5a3d00f branch February 22, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated deployment Deployment configuration html-css HTML/CSS changes i18n Internationalization/localization news News articles and content generation news-article refactor Code refactoring rtl RTL language support (Arabic, Hebrew) size-xl Extra large change (> 1000 lines) testing Test coverage translation Translation updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants