Repository navigation
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
Open
botaniqor wants to merge 1 commit into
botaniqor wants to merge 1 commit into
Conversation
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.
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.
Before
skills/core/regulatory/references/jurisdictions/uk.mddocuments 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 theStatus:line." Themarkersarray (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-datemarker (line 29). That is then the only finding, it is not in theincidentalset, andversion_statereachesreturn CONFIRMED(scripts/integrity.py, line 215).Reproduction
The saved page (retrieved 2026-10-16) reads:
read_version.pyprints, after its header lines: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 pagehttps://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/3reads "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/6reads "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/18carries the same status line. Theprospective-provisionspattern (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/madereads "Status: This is the original version (as it was originally made)." Theas-enacted-textpattern (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/1420prints 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-appliedmarker (line 24):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:
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):
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"):
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-effectiveand--research-dateselection 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-textmarker:{ "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-textpattern becomesStatus:\\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." Theprospective-provisionspattern becomesStatus:\\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 theincidentalset.With these markers:
[superseded] point-in-time-viewand exit 1;--historical-effective 2019-01-01 --research-date 2019-03-01prints "Using historical text effective 2019-01-01 because this research concerns 2019-03-01." and exits 0;[superseded] provision-repealed-annotationand 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/6reports[superseded] provision-prospectiveand 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/madeand/uksi/2019/419/regulation/2/madereport[superseded] as-enacted-textand exit 1;/uksi/2023/1420and its/madepage remain unresolved, since the publisher holds no revised text for that instrument; the base and/enactedpages of the Sale of Goods Act 1893 still stop onas-enacted-text;/ukpga/1998/29/section/1("Status: This version of this provision no longer has effect.") reports[superseded] provision-no-longer-has-effectbeside the outstanding-changes stop, as do sections 1 and 2 of the Consumer Credit Act 1974, and/uksi/2008/1277/regulation/3reports it and exits 1;prospective-provisionspattern stays in theincidentalset. With--historical-effectiveand--research-date,version_staterecords a historical selection for any page with a finding and noincompletefinding, so/uksi/2019/419/madeand/uksi/2019/419/regulation/2/made, unresolved with the shipped registry, are then recorded as a historical selection, as an Act's/enactedpage already is; no other page of the 73 changes state with those options.The marker note at line 24 becomes:
Its pattern and its
incompleteseverity are unchanged, so it stops the run on the same pages as before. Lines 52 to 60 become:Line 99 becomes "All five verified against this publisher:". Lines 126 to 128 become:
Lines 132 to 134 become:
No script changes.
version_statealready 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 packrewritesplugins/legalquants-litigation/skills/regulatory/references/jurisdictions/uk.mdandplugins/legalquants-transactional/skills/regulatory/references/jurisdictions/uk.md; no other tracked path changes.Checks
pnpm plugin-pack:checkreports "Static skills are current.", the pluginctl test suite passes (177 passed), the repository pytest suite passes (2,138 passed, 10 skipped) andpnpm validate(pluginctl validate) exits 0.read_version.pyat 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.pyat 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 onchanges-yet-to-be-appliedwith both registries, the corrected registry also reportingprovision-prospective. With--historical-effective 2019-03-29 --research-date 2019-06-01, only the/madepages of S.I. 2019/419 and of its regulation 2 change state, from unresolved to a historical selection.read_version.pyat 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.pnpm check. The repository has no test for the regulatory registry.Reported by Sam Redlich of 1331 Labs Inc.