Skip to content

feat: resolve RTI correspondence references and type request items - #184

Open
netzen-abm wants to merge 25 commits into
mainfrom
docs/documentation-governance-2026-09-11
Open

netzen-abm wants to merge 25 commits into
mainfrom
docs/documentation-governance-2026-09-11

Conversation

@netzen-abm

Copy link
Copy Markdown
Owner

Purpose

Advance issue #181 from structural checking to registry-backed reference resolution and make the supplied universal RTI template's request list explicit and safer.

Changes

  • Add typed RTI item kinds: existing record, existing statistics/dataset, inspection, certified copy, existing electronic record, or explanation/new analysis (review required).
  • Add optional per-item and overall reporting periods with deterministic reversed-range checks.
  • Flag requests marked as containing personal/sensitive data for review; do not auto-disclose or auto-refuse them.
  • Add optional scheme name, official reference and already-paid fee evidence reference; do not hard-code a fee amount, payment mode, portal or identity-document requirement.
  • Add evaluate_with_registries for existing Authority, Jurisdiction, Document/DocumentVersion, EvidenceTrust, LegalSource and Procedure registries. It checks resource types, record presence/status, active scope alignment, legal-source verification status and canonical UTC effective interval.
  • Add focused tests for missing document references, legal source effective dates, successful reference resolution, RTI reporting periods, sensitive-data flags and requests for new analysis.
  • Clarify RTI procedure source notes: Section 6(3) transfer no later than five days, Section 7(1) general 30-day response period and 48-hour life/liberty proviso, Section 19(1) general 30-day first-appeal period with sufficient-cause exception. Authority-specific rules still control filing mode, fee, portal and evidence requirements.

Deliberate limits

  • Registry status resolution does not verify the actual bytes of a document or independently establish authenticity. The relevant authorized content/evidence query and human review remain required.
  • Source effective date comparison currently accepts only strict canonical UTC instants YYYY-MM-DDTHH:MM:SSZ; alternative forms receive a review finding rather than an inferred comparison.
  • This does not calculate statutory deadlines, render final prose, decide a disclosure exemption, automate appeal advice, authorize dispatch, or submit an RTI request.
  • Current Procedure stores links to sources and steps but does not yet model authority-specific fee amounts/payment modes or filing portal scope as typed fields. This PR intentionally does not add a speculative fee/portal model; that gap remains for a separately specified contract.
  • No new dependency, package split, interpreter, runtime, event loop, or general legal engine.

Repository hygiene

Uses the existing documentation branch; no new active branch. Branch count is exactly nine. PR diff is intended to be limited to src/administrative_correspondence.rs, src/lib.rs and the corresponding workflow-contract documentation. Archive-first policy remains in force.

Verification required

Foundation format/check/test/PostgreSQL/Clippy, Security/Supply Chain, CodeQL, and nine-branch enforcement must complete on the exact PR head. Merge only after required checks are green.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T07:07:22.250651Z 9f44922 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f44922357

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

);
if reference.resource_type == ResourceType::Document {
if let Some(document) = registries.documents.get_document(&reference.id) {
if !document.jurisdiction_refs.is_empty() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate the notice authority against the selected authority

For a NoticeReply whose registered source document names an authority_ref, this check only compares jurisdiction scopes and never checks that authority against the selected issuing_authority. A notice from a different authority in the same jurisdiction can therefore pass as resolved, leaving the reply preflight pointed at the wrong authority; flag the mismatch or require review.

Useful? React with 👍 / 👎.

Comment on lines +373 to +375
findings.push(review(
ChecklistFindingCode::MissingSchemeName,
"rti_details",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid requiring a scheme name for generic RTI requests

When a generic RTI request has no scheme-specific context, this branch still emits MissingSchemeName, so evaluate() returns ReviewRequired even though no scheme name applies; the same finding is emitted when rti_details is present but its optional scheme_name is empty. Since this context is documented as optional, only flag a missing name when the request actually concerns a scheme.

Useful? React with 👍 / 👎.

Comment thread src/administrative_correspondence.rs Outdated
Comment on lines +848 to +851
if source.verification_status != VerificationStatus::Verified {
push_finding(
findings,
review(ChecklistFindingCode::LegalSourceUnverified, field),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Require authoritative support for verified legal claims

When a VerifiedRule, OfficialProcedure, or AuthoritativeInterpretation claim cites only a registered LegalSource with source_type == SecondarySource, this branch checks only verification_status and can leave the result StructurallyComplete. A verified secondary source is not authoritative legal support; require an authoritative source or flag the claim for review.

Useful? React with 👍 / 👎.

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