Skip to content

Commit a1a8b8e

Browse files
authored
feat: capture Victoria provider source shape (#97)
Merged after all required GitHub checks passed.
1 parent c44e0e5 commit a1a8b8e

5 files changed

Lines changed: 181 additions & 20 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'nz-legislation-tool': patch
3+
---
4+
5+
Record the official Victorian legislation source shape and keep Victoria runtime support explicitly planned, unsupported, and gated.

conductor/tracks/anz-provider-victoria/plan.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,49 @@
22

33
## Phase 0: Source-shape discovery
44

5-
**Status:** Not started.
5+
**Status:** Complete for source-shape discovery; runtime adapter remains gated.
66

7-
- [ ] Capture the official Victorian legislation source entry points and access
7+
- [x] Capture the official Victorian legislation source entry points and access
88
terms.
9-
- [ ] Record machine-readable source-shape details: document types, URL
9+
- [x] Record machine-readable source-shape details: document types, URL
1010
patterns, identifiers, version cues, and provenance fields.
11-
- [ ] Mark ambiguous or unsupported cases explicitly instead of inferring
11+
- [x] Mark ambiguous or unsupported cases explicitly instead of inferring
1212
placeholder behavior.
1313

1414
## Phase 1: Authoritative formats and adapter mapping
1515

16-
**Status:** Not started.
16+
**Status:** Documented; implementation remains blocked on machine-readable evidence.
1717

18-
- [ ] Choose the authoritative formats the future Victoria adapter will trust.
19-
- [ ] Map discovery, retrieval, versioning, export, and provenance behavior to
18+
- [x] Choose the authoritative formats the future Victoria adapter will trust.
19+
- [x] Map discovery, retrieval, versioning, export, and provenance behavior to
2020
the provider contract.
21-
- [ ] Record unsupported capability boundaries so the adapter can fail
21+
- [x] Record unsupported capability boundaries so the adapter can fail
2222
truthfully.
2323

2424
## Phase 2: Fixtures and tests
2525

26-
**Status:** Not started.
26+
**Status:** Complete for metadata-only fixtures and unsupported-path tests.
2727

28-
- [ ] Build source-backed fixtures that reflect the recorded Victoria shapes.
29-
- [ ] Add tests for no-placeholder legal data, parsing, normalization, and
28+
- [x] Build source-backed metadata fixtures that reflect the recorded Victoria shapes.
29+
- [x] Add tests for no-placeholder legal data, parsing, normalization, and
3030
unsupported capability errors.
31-
- [ ] Add manifest/provider alignment checks for Victoria.
31+
- [x] Add manifest/provider alignment checks for Victoria.
3232

3333
## Phase 3: MCP/export and provenance
3434

35-
**Status:** Not started.
35+
**Status:** Gated; provider-aware unsupported boundaries are covered.
3636

37-
- [ ] Define Victoria source cards and provenance metadata for export output.
38-
- [ ] Route MCP/export behavior through provider-aware gates.
39-
- [ ] Keep Victoria unsupported in the manifest until source-backed evidence
37+
- [x] Define Victoria source cards and provenance metadata for export output.
38+
- [x] Route MCP/export behavior through provider-aware gates.
39+
- [x] Keep Victoria unsupported in the manifest until source-backed evidence
4040
is complete.
4141

4242
## Phase 4: Docs and release notes
4343

44-
**Status:** Not started.
44+
**Status:** Complete for gated docs and release-note posture.
4545

46-
- [ ] Draft Victoria-specific docs language that stays truthful about support
46+
- [x] Draft Victoria-specific docs language that stays truthful about support
4747
state.
48-
- [ ] Draft release-note language that distinguishes NZ stable support from
48+
- [x] Draft release-note language that distinguishes NZ stable support from
4949
Victoria prerelease or unsupported status.
50-
- [ ] Re-check the track against the release gates before any public claim.
50+
- [x] Re-check the track against the release gates before any public claim.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Victoria Source Validation
2+
3+
Validated on 2026-07-13 against the official Victorian legislation and Gazette
4+
entry points.
5+
6+
## Official source
7+
8+
- Victorian legislation: `https://www.legislation.vic.gov.au/`
9+
- Legislation in force: `https://www.legislation.vic.gov.au/in-force`
10+
- Repealed or revoked legislation: `https://www.legislation.vic.gov.au/repealed-revoked`
11+
- Legislative information: `https://www.legislation.vic.gov.au/legislative-information`
12+
- Victoria Government Gazette: `https://www.gazette.vic.gov.au/`
13+
14+
## Verified boundaries
15+
16+
- The Victorian legislation website is the primary official source for current
17+
and superseded Acts and statutory rules.
18+
- The website provides separate in-force and repealed/revoked collections and
19+
publishes legislation in HTML and PDF representations.
20+
- A public machine-readable API or feed was not verified in this discovery
21+
pass. The future adapter must not infer one from page markup or download
22+
links.
23+
- The Victoria Government Gazette is a separate official publication surface;
24+
Gazette ingestion remains a separate gated capability.
25+
26+
## Current repository posture
27+
28+
Victoria remains explicitly planned and unsupported. No runtime search,
29+
retrieval, version, export, citation, or MCP capability is enabled, and this
30+
change adds no legal records. The provider must continue returning structured
31+
`unsupported_provider_capability` responses until source-backed adapter
32+
fixtures, provenance, and live-access evidence exist.
33+
34+
## Before enabling runtime support
35+
36+
1. Capture and review an official machine-readable contract, if one becomes
37+
available, without committing credentials or private access details.
38+
2. Map authoritative formats, version history, licensing, and update cadence
39+
into the provider contracts.
40+
3. Add source-shaped fixtures with no placeholder legal text and provenance
41+
assertions.
42+
4. Add opt-in live smoke tests that respect Victorian source terms and rate
43+
limits.
44+
5. Update release notes to distinguish NZ stable support from Victoria gated
45+
support.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"jurisdiction": "au-vic",
3+
"providerId": "victorian-legislation",
4+
"sourceAuthority": "Victorian Office of the Chief Parliamentary Counsel",
5+
"sourceEntryPoints": [
6+
"https://www.legislation.vic.gov.au/",
7+
"https://www.legislation.vic.gov.au/in-force",
8+
"https://www.legislation.vic.gov.au/repealed-revoked",
9+
"https://www.legislation.vic.gov.au/legislative-information",
10+
"https://www.gazette.vic.gov.au/"
11+
],
12+
"accessTerms": {
13+
"publicAccess": "free public access to the Victorian legislation website",
14+
"machineReadableAccess": "no public machine-readable API or feed verified in this discovery pass",
15+
"copyright": "Victorian Government copyright and website terms apply"
16+
},
17+
"authoritativeFormats": ["HTML", "PDF"],
18+
"convenienceFormats": ["HTML", "PDF"],
19+
"collections": ["in-force", "repealed-or-revoked", "legislative-information"],
20+
"urlPatterns": [
21+
"https://www.legislation.vic.gov.au/in-force",
22+
"https://www.legislation.vic.gov.au/repealed-revoked",
23+
"https://www.legislation.vic.gov.au/sites/default/files/{year}-{month}/{filename}.pdf"
24+
],
25+
"identifierCues": [
26+
"title and year displayed by the Victorian legislation website",
27+
"Act and statutory-rule version history",
28+
"consolidated current and superseded versions"
29+
],
30+
"versionCues": [
31+
"current and superseded versions in the in-force collection",
32+
"repealed or revoked status",
33+
"version history and commencement information",
34+
"point-in-time material where published"
35+
],
36+
"adapterMapping": {
37+
"search": "Not enabled; use official browse/search pages only after a machine-readable contract is verified.",
38+
"retrieval": "Future adapter may retrieve authoritative PDF or HTML pages with format and authority labels.",
39+
"versioning": "Use published version history, commencement, and superseded/repealed cues; do not infer versions from filenames alone.",
40+
"export": "Unsupported until a source-backed parser and provenance-preserving export exists.",
41+
"provenance": "Emit sourceAuthority, jurisdiction, source URL, format, authority status, and retrieval timestamp.",
42+
"unsupported": "Return structured unsupported_provider_capability for runtime operations until tests and fixtures prove the adapter."
43+
},
44+
"edgeCases": [
45+
"the website distinguishes Acts from statutory rules",
46+
"repealed or revoked material is separate from in-force material",
47+
"PDF and HTML representations may have different authority or convenience status",
48+
"no public machine-readable API or feed was verified in this discovery pass",
49+
"the Victoria Government Gazette is a separate official publication surface"
50+
],
51+
"runtimeStatus": "unsupported",
52+
"fixturePolicy": "metadata-only source-shape fixture; no legal text or fabricated records"
53+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import { readFileSync } from 'node:fs';
2+
import { describe, expect, it } from 'vitest';
3+
4+
import {
5+
getProviderCapability,
6+
getUnsupportedProviderCapability,
7+
} from '../src/providers/capability-manifest.ts';
8+
import { getProviderSourceCard } from '../src/providers/source-cards.ts';
9+
10+
const fixture = JSON.parse(
11+
readFileSync('docs/maintainers/victoria-provider-source-shape.json', 'utf8')
12+
) as {
13+
jurisdiction: string;
14+
providerId: string;
15+
sourceEntryPoints: string[];
16+
authoritativeFormats: string[];
17+
collections: string[];
18+
runtimeStatus: string;
19+
fixturePolicy: string;
20+
adapterMapping: Record<string, string>;
21+
};
22+
23+
describe('Victoria provider source shape', () => {
24+
it('records official metadata without legal records', () => {
25+
expect(fixture).toMatchObject({
26+
jurisdiction: 'au-vic',
27+
providerId: 'victorian-legislation',
28+
authoritativeFormats: ['HTML', 'PDF'],
29+
collections: expect.arrayContaining(['in-force', 'repealed-or-revoked']),
30+
runtimeStatus: 'unsupported',
31+
fixturePolicy: expect.stringContaining('metadata-only'),
32+
});
33+
for (const url of fixture.sourceEntryPoints) {
34+
expect(new URL(url).protocol).toBe('https:');
35+
expect(new URL(url).hostname).toMatch(/(?:legislation\.vic\.gov\.au|gazette\.vic\.gov\.au)$/);
36+
}
37+
});
38+
39+
it('keeps Victoria blocked in capability, source-card, and unsupported contracts', () => {
40+
expect(getProviderCapability('au-vic')).toMatchObject({
41+
providerId: fixture.providerId,
42+
releaseChannel: 'planned',
43+
sourceAuthority: 'Victorian legislation website',
44+
});
45+
expect(getUnsupportedProviderCapability('au-vic', 'search')).toMatchObject({
46+
error: 'unsupported_provider_capability',
47+
jurisdiction: 'au-vic',
48+
providerId: fixture.providerId,
49+
});
50+
expect(getProviderSourceCard('au-vic')).toMatchObject({
51+
runtimeSupported: false,
52+
runtimeKind: 'planned-au-provider',
53+
releaseGate: { status: 'blocked' },
54+
submissionGate: { status: 'blocked' },
55+
});
56+
expect(fixture.adapterMapping.export).toMatch(/Unsupported/);
57+
});
58+
});

0 commit comments

Comments
 (0)