Prepare governed Australian source-pack adapters - #112
Conversation
Commit notes: Extend the existing nine-jurisdiction mainstreaming track with a versioned FOI legislation source contract.
📦 Bundle Size Analysis
|
There was a problem hiding this comment.
Review Summary
This PR adds well-structured Australian legislation source adapters with comprehensive security validation. The implementation demonstrates strong security practices including HTTPS-only enforcement, SHA-256 hash validation, byte count verification, and host allowlisting.
Critical Issue Found
One logic error was identified in the Tasmania XML parser that hardcodes a specific act ID, preventing the function from working with other Tasmania legislation. This needs to be fixed before merge.
Testing
The test suite shows excellent coverage with 159 passing tests and proper validation of security constraints. The fail-closed validation approach is appropriate for handling official government sources.
Notes
As stated in the PR description, this remains a draft PR with runtime support gated and is intentionally not authorized for merge. The one critical issue should be addressed before considering any future activation.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
| if (id !== 'act-2009-070' || title !== source.title) { | ||
| throw new Error('Tasmania XML identity does not match the pinned source artifact'); | ||
| } |
There was a problem hiding this comment.
🛑 Logic Error: Hardcoded act ID check prevents function from working with any other Tasmania legislation. Replace the hardcoded 'act-2009-070' check with validation that the extracted ID matches the artifact's expected ID from metadata or remove this restriction to allow the parser to handle other Tasmania acts.
| if (id !== 'act-2009-070' || title !== source.title) { | |
| throw new Error('Tasmania XML identity does not match the pinned source artifact'); | |
| } | |
| if (title !== source.title) { | |
| throw new Error('Tasmania XML identity does not match the pinned source artifact'); | |
| } |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
📦 Bundle Size Analysis
|
📦 Bundle Size Analysis
|
📦 Bundle Size Analysis
|
Summary
Validation
Boundaries