Skip to content

fix(regulatory): stop a dated UK page of an Act from passing as the confirmed version, recognise the UK status lines and annotations the registry misses, and correct its account of outstanding changes, Explanatory Notes and correction slips - #9

Open
botaniqor wants to merge 1 commit into
LegalQuants:mainfrom
1331labs:errata/lq-004

Conversation

@botaniqor

Copy link
Copy Markdown

Before

skills/core/regulatory/references/jurisdictions/uk.md documents the dated URL form (line 103, "/ukpga/2023/50/2024-06-01 the text as it stood on that date") and says at line 119: "The only string that actually tells you where you are is the Status: line." The markers array (lines 13 to 44) has a stop marker for the as-enacted status line and none for the status line of a dated page.

Each of the three dated Act pages tested still prints the sentence matched by the informational revised-to-date marker (line 29). That is then the only finding, it is not in the incidental set, and version_state reaches return CONFIRMED (scripts/integrity.py, line 215).

Reproduction

python3 skills/core/regulatory/scripts/fetch_source.py \
  https://www.legislation.gov.uk/ukpga/2018/12/section/3/2019-01-01 out \
  --jurisdiction UK --profile legislation-gov-uk \
  --instrument-id ukpga/2018/12/section/3/2019-01-01 --publisher legislation.gov.uk
python3 skills/core/regulatory/scripts/read_version.py out/source.html \
  --jurisdiction UK --json out/version.json

The saved page (retrieved 2026-10-16) reads:

Status: Point in time view as at 01/01/2019. This version of this provision has been superseded.

Data Protection Act 2018, Section 3 is up to date with all changes known to be in force on or before 16 October 2026.

read_version.py prints, after its header lines:

[info] revised-to-date  -> 16 October 2026
    The revision date. It moves daily, so it is a fact about today's fetch and must be dated in the note.

Using official text with a confirmed publisher version marker.

and exits 0. The same result was obtained on https://www.legislation.gov.uk/ukpga/2023/50/section/17/2024-06-01 ("Status: Point in time view as at 01/06/2024.") and on the whole-Act page https://www.legislation.gov.uk/ukpga/2018/12/2019-01-01 ("Status: Point in time view as at 01/01/2019."), fetched the same day.

Status lines and annotations the registry does not recognise

Pages fetched on 2026-10-16 with the same commands:

  • https://www.legislation.gov.uk/uksi/2008/1277/regulation/3 reads "Status: This version of this provision no longer has effect." (the page explains the status: "No longer has effect, generally means that this provision has been repealed. Take a look at the annotations at the end of the provision for further information."), as do the pages for section 1 of the Data Protection Act 1998 and sections 1 and 2 of the Consumer Credit Act 1974. No marker matches that line: the regulation 3 page ends unresolved ("I could not confirm the operative text, so I have not relied on it.", exit 1), and the other three stop only because they also list changes and effects yet to be applied. The pages for sections 12, 28 and 30 of the Unfair Contract Terms Act 1977 carry no status line and print each section as a row of dots with the annotation "F1 S. 12 omitted", "F1 S. 28 omitted" or "F1 S. 30 repealed by Consumer Safety Act 1978 (c. 38) , s. 10(1) , Sch. 3"; they end unresolved in the same way.
  • https://www.legislation.gov.uk/ukpga/2023/28/section/6 reads "Status: This version of this provision is prospective." and ends unresolved with no finding that the provision shown is not operative, as did the pages for sections 104, 106 and 107 of the Crime and Policing Act 2026 on that date; https://www.legislation.gov.uk/ukpga/2023/50/section/18 carries the same status line. The prospective-provisions pattern (line 35) matches only "This version of this Act contains provisions that are prospective", so neither line is recognised, nor "Status: This version of this Instrument contains provisions that are prospective." (/uksi/2019/419) or "Status: This version of this schedule contains provisions that are prospective." (/ukpga/2023/50/schedule/8).
  • https://www.legislation.gov.uk/uksi/2019/419/made reads "Status: This is the original version (as it was originally made)." The as-enacted-text pattern (line 17) matches only "(as it was originally enacted)", so the page prints "No version markers matched." and ends unresolved instead of stopping with the instruction to refetch the revised text. https://www.legislation.gov.uk/uksi/2023/1420 prints the same status line followed by "This item of legislation is currently only available in its original format."

The registry's account of outstanding changes, its URL count and Explanatory Notes

The note of the changes-yet-to-be-applied marker (line 24):

Amendments that are IN FORCE but not yet written into the words on this page. The text you are reading is out of date by exactly this list. Read the list.

Lines 52 and 53 call the list "a set of amendments that are already in force and are not in the text above", and lines 59 and 60 say the marker "is the only UK marker that means the words you just read are wrong."

The current page for Online Safety Act 2023 section 12 (fetched 2026-10-16) reads:

Changes to legislation: Online Safety Act 2023, Section 12 is up to date with all changes known to be in force on or before 16 October 2026. There are changes that may be brought into force at a future date.

Every effect it lists under "Changes and effects yet to be applied to Section 12" is made by section 104(5)(b), 106(7), 107(5) or 247(4) of the Crime and Policing Act 2026. The publisher's pages for sections 104, 106 and 107 read "Status: This version of this provision is prospective."; its page for section 247 reads "I1 S. 247 not in force at Royal Assent, see s. 255(2)(k) I2 S. 247(3)(b) in force at 29.6.2026 by S.I. 2026/689 , reg. 2(1)(z7)". The current page for Data Protection Act 2018 section 3 carries the same banner and lists one effect, made by Schedule 3 paragraph 78(3) of 2022 c. 18 (N.I.), whose page reads "I1 Sch. 3 para. 78 not in operation at Royal Assent, see s. 160(1)". The publisher's guidance (https://www.legislation.gov.uk/understanding-legislation) says: "We aim to incorporate new amendments into the text of the legislation within three months of those amendments coming into force."

The Crime and Policing Act 2026 (Commencement No. 4) Regulations 2026 (S.I. 2026/1090, made 15 October 2026, https://www.legislation.gov.uk/uksi/2026/1090/made), reg. 2(b) to (d), bring section 104(4) and (5), section 106 and section 107 into force on 6 November 2026. From that date, until the publisher applies them, three of the four effects listed on the section 12 page are in force.

Line 99 reads "All four verified against this publisher:" and five URL forms follow.

Lines 132 to 134 say Explanatory Notes "are useful, they are published by the department, and they are not evidence of what the Act means." In R (O) v Secretary of State for the Home Department [2022] UKSC 3, para 30 (https://caselaw.nationalarchives.gov.uk/uksc/2022/3/data.pdf):

Explanatory notes, prepared under the authority of Parliament, may cast light on the meaning of particular statutory provisions.

and, of external aids generally, "none of these external aids displace the meanings conveyed by the words of a statute that, after consideration of that context, are clear and unambiguous and which do not produce absurdity." The publisher describes the text of Explanatory Notes as "created by the government department responsible for the subject matter of the Act".

Lines 127 and 128 say correction slips "change the text without an amending instrument." The publisher's guidance (https://www.legislation.gov.uk/understanding-legislation, "Corrections"):

If a piece of legislation contains substantive errors, a new piece of legislation will be enacted to correct those errors. If the errors are minor and do not change the meaning of the legislation, but ought to be corrected to avoid misleading readers – for example a wrong cross reference - a correction slip will be produced and published alongside the legislation. The correction will be made on the website copy, but the original print PDF will not be changed.

Effect

A dated page of an Act, which on the Data Protection Act 2018 section 3 page the publisher itself labels superseded, is recorded as the confirmed version, without the --historical-effective and --research-date selection that SKILL.md requires for a dated question.

The page of a provision whose version shown is not in force or that no longer has effect, the page of a provision repealed or omitted as a whole, and the original text of a revised statutory instrument end unresolved, or stop for an unrelated reason, with no finding that says why.

The outstanding-changes note tells the model that current text is out of date and wrong where, on both pages traced, the banner says the text is up to date with all changes known to be in force and every listed effect is made by a provision not in force. The Explanatory Notes sentence tells the model to disregard a source the courts use to cast light on meaning. The correction-slip sentence omits that a slip corrects only minor errors that do not change the meaning, and that the original print PDF is not corrected.

After

Insert after the as-enacted-text marker:

{
  "name": "point-in-time-view",
  "severity": "superseded",
  "pattern": "Status:\\s*Point in time view as at\\s+(\\d{2}/\\d{2}/\\d{4})",
  "note": "You are on a dated point-in-time page. It is the text as it stood on the captured date, which is not necessarily the latest revised text, and it can still print the 'up to date' sentence. Refetch the base URL, or record the dated question with --historical-effective and --research-date."
}

Also insert, after point-in-time-view, three stop markers:

{
  "name": "provision-prospective",
  "severity": "superseded",
  "pattern": "Status:\\s*(?:Point in time view as at \\d{2}/\\d{2}/\\d{4}\\.\\s*)?This version of this provision is prospective",
  "note": "The publisher marks the version of the provision on this page as prospective: either the provision has never come into force, or this text of it awaits a date for the changes to come into force. It is printed in full and is not the operative text. Do not quote it as operative law. Check its Commencement Information, and state in the note what applies until it comes into force."
},
{
  "name": "provision-no-longer-has-effect",
  "severity": "superseded",
  "pattern": "Status:\\s*This version of this provision no longer has effect",
  "note": "The publisher marks the provision on this page as no longer having effect, which generally means that it has been repealed. Read the annotations at the end of the provision. Do not quote it as operative law."
},
{
  "name": "provision-repealed-annotation",
  "severity": "superseded",
  "pattern": "Changes to legislation: [^.]{0,200}?, (?:Section|Regulation|Article) (\\d+[A-Z]*)\\b.*?\\bF\\d+ (?-i:S|Reg|Art)\\. \\1 (?:repealed|revoked|omitted)\\b(?!\\s*\\((?:prosp|[ENSW]\\.))",
  "note": "The Textual Amendments on this page record that the provision itself has been repealed, revoked or omitted, and the page shows only what is left in its place. Read the annotation for the date and extent, and do not quote the provision as operative law."
}

The last pattern takes the provision's number from the banner ("..., Section 30.") and matches only an annotation that repeals, revokes or omits that whole provision ("F1 S. 30 repealed by"); a subsection annotation ("S. 3(8) omitted") does not match, the abbreviation is matched case-sensitively so that "Words in s. 12 ..." does not, and an annotation that states an extent or a prospective repeal ("F1 S. 40 repealed (S.)", "repealed (E.W.S.)", "repealed (prosp.)") does not either, because the text shown may still operate elsewhere or until a later date. The marker reads only a section, regulation or article named in the banner; an annotation that repeals, revokes or omits a whole Schedule paragraph or rule is not read by it.

The as-enacted-text pattern becomes Status:\\s*This is the original version \\(as it was originally (?:enacted\\)|made\\)(?!\\.?\\s*This item of legislation is currently only available in its original format)), so the exclusion applies only to a statutory instrument, and its note becomes "You are on the /enacted page, or for a statutory instrument the /made page. This is the text as passed or made, and it says nothing about what has happened to it since. Refetch the base URL without /enacted or /made." The prospective-provisions pattern becomes Status:\\s*This version of this [A-Za-z ]{1,40}?contains provisions that are prospective; its name, severity and note are unchanged, so it stays in the incidental set.

With these markers:

  • the three dated pages above report [superseded] point-in-time-view and exit 1;
  • the Data Protection Act 2018 section 3 page with --historical-effective 2019-01-01 --research-date 2019-03-01 prints "Using historical text effective 2019-01-01 because this research concerns 2019-03-01." and exits 0;
  • the pages for sections 12, 28 and 30 of the Unfair Contract Terms Act 1977, which print each section as a row of dots with the annotation "F1 S. 12 omitted", "F1 S. 28 omitted" or "F1 S. 30 repealed by Consumer Safety Act 1978 (c. 38) , s. 10(1) , Sch. 3", report [superseded] provision-repealed-annotation and exit 1; the pages for section 40 of the Sale of Goods Act 1979 ("F1 S. 40 repealed (S.)") and section 724 of the Companies Act 1985 ("F1 S. 724 repealed (E.W.S.)") end unresolved, as before;
  • /ukpga/2023/28/section/6 reports [superseded] provision-prospective and exits 1, as did sections 104, 106 and 107 of the Crime and Policing Act 2026 on 2026-10-16; /ukpga/2023/50/section/18, and on 2026-10-20 those three sections, report it beside the outstanding-changes stop;
  • /uksi/2019/419/made and /uksi/2019/419/regulation/2/made report [superseded] as-enacted-text and exit 1; /uksi/2023/1420 and its /made page remain unresolved, since the publisher holds no revised text for that instrument; the base and /enacted pages of the Sale of Goods Act 1893 still stop on as-enacted-text;
  • /ukpga/1998/29/section/1 ("Status: This version of this provision no longer has effect.") reports [superseded] provision-no-longer-has-effect beside the outstanding-changes stop, as do sections 1 and 2 of the Consumer Credit Act 1974, and /uksi/2008/1277/regulation/3 reports it and exits 1;
  • no page tested moves into the confirmed state. Without the historical-selection options every marker added stops a page, and the widened prospective-provisions pattern stays in the incidental set. With --historical-effective and --research-date, version_state records a historical selection for any page with a finding and no incomplete finding, so /uksi/2019/419/made and /uksi/2019/419/regulation/2/made, unresolved with the shipped registry, are then recorded as a historical selection, as an Act's /enacted page already is; no other page of the 73 changes state with those options.

The marker note at line 24 becomes:

Effects recorded by the editorial team that are not yet written into the words on this page. If the banner above the list says the item is up to date with all changes known to be in force, a listed effect may be a change not yet in force rather than one missing from the text; otherwise a listed effect may already be in force. Check the commencement of each listed effect that touches a provision relied on.

Its pattern and its incomplete severity are unchanged, so it stops the run on the same pages as before. Lines 52 to 60 become:

list under "Changes and effects yet to be applied" a set of changes and
effects that are not yet applied to the text above.

Both statements are true. Where the banner says the item is up to date with all
changes known to be in force, the text above includes every change the publisher
knows to be in force on that date, so a listed effect may be a change not yet in
force rather than one missing from the text. The editorial team applies
amendments by hand, so where the banner does not say that, a listed effect may
already be in force. The list is on the page.

That is why changes-yet-to-be-applied stops the run: check the commencement of
every listed effect that touches a provision relied on before treating the words
you just read as either current or out of date.

Line 99 becomes "All five verified against this publisher:". Lines 126 to 128 become:

  • Correction slips are the UK analogue of a corrigendum, listed on the page
    under "More Resources" with a date. They correct minor errors that do not
    change the meaning of the legislation (for example a wrong cross-reference)
    without an amending instrument; the correction is made on the website copy,
    not on the original print PDF. A substantive error is corrected by new
    legislation.

Lines 132 to 134 become:

  • Explanatory Notes are not law. They are useful, they are prepared by the
    government department responsible for the subject matter of the Act, and a
    court may use them to cast light on the meaning of particular provisions, but
    they do not displace the meaning of words that, read in context, are clear and
    unambiguous and do not produce absurdity (R (O) v Secretary of State for the
    Home Department [2022] UKSC 3, para 30). Do not quote them in an operative
    position.

No script changes. version_state already returns the historical state when both dates are supplied, before it tests for a superseded finding. The registry JSON block still parses, and each new or changed pattern, searched in the text of all 73 pages tested, matched only the status line or annotation it names.

Generated files

pnpm pluginctl pack rewrites plugins/legalquants-litigation/skills/regulatory/references/jurisdictions/uk.md and plugins/legalquants-transactional/skills/regulatory/references/jurisdictions/uk.md; no other tracked path changes.

Checks

  • On 2026-10-21, with this change and its generated copies applied at fa5a668: pnpm plugin-pack:check reports "Static skills are current.", the pluginctl test suite passes (177 passed), the repository pytest suite passes (2,138 passed, 10 skipped) and pnpm validate (pluginctl validate) exits 0.
  • read_version.py at commit fa5a668, before and after the change, on 2026-10-16, on 73 pages fetched that day, among them every page named above, with the results as listed under After. Every page that lists changes and effects yet to be applied stops on that marker before and after the change, and no page moves into the confirmed state.
  • read_version.py at the same commit, before and after the change, on 2026-10-20, on the same 73 pages fetched again that day: every result is as on 2026-10-16, except that the pages for sections 104, 106 and 107 of the Crime and Policing Act 2026, which then listed their commencement by S.I. 2026/1090 under "Changes and effects yet to be applied", stop on changes-yet-to-be-applied with both registries, the corrected registry also reporting provision-prospective. With --historical-effective 2019-03-29 --research-date 2019-06-01, only the /made pages of S.I. 2019/419 and of its regulation 2 change state, from unresolved to a historical selection.
  • read_version.py at the same commit, before and after the change, on 2026-10-21, on the 73 pages saved on 2026-10-20, without and with those options: every result is as on 2026-10-20.
  • Not run: the browser checks and the remainder of pnpm check. The repository has no test for the regulatory registry.

Reported by Sam Redlich of 1331 Labs Inc.

Add a point-in-time-view stop marker, so that a dated page of an Act
is no longer recorded as the confirmed version; a dated question is
still accepted with --historical-effective and --research-date.

Stop on a provision whose version is prospective or that no longer has
effect, and on an annotation that repeals, revokes or omits the whole
provision shown. Match the prospective line of an instrument or
Schedule, and a statutory instrument's as-made status line unless the
publisher holds it only in original format. No marker is added that
can confirm a page.

Correct the account of the outstanding-changes list, count the five
URL forms as five, state that a court may use Explanatory Notes to
cast light on meaning (R (O) v SSHD [2022] UKSC 3, para 30), and state
the limits of a correction slip.

Regenerate the litigation and transactional bundles with pnpm
pluginctl pack.
@botaniqor
botaniqor requested a review from jamietso as a code owner October 23, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant