I rebuilt a question found in actual production source as independent synthetic code. The complete implementation, examples and tests are shared without connecting the original business program or material.

Use normalized segments as shared input

Route normalizes Unicode to NFC and encodes each plain segment into a relative path. Pre-encoded addresses, separators and query-control characters fail. This is a document-name contract rather than an arbitrary URL parser. Duplicate normalized routes fail before inventory creation.

The corresponding readable path receives an index file. No actual regional directory or business origin is imported. Filesystem-specific restrictions remain with a real generator; this function does not claim to cover every operating system filename rule.

Find file and sitemap mismatches separately

Reconciliation compares expected files with a supplied output inventory, and only public documents enter expected discovery. Missing and unexpected items remain distinct; duplicates fail. Equal counts cannot establish identity, so the result preserves exactly which entries differ.

The function does not scan a directory. A caller must obtain an observed build inventory. HTTP status, caching and redirects also fall outside the contract; deployed route verification requires separate evidence.

Archive and private are distinct policies

Archive is excluded from discovery without requiring authentication; private declares authentication necessary. Noindex is not access control, permission or guaranteed immediate removal from search. The module deploys neither headers nor login configuration.

Saved records show synthetic regional, archive and private entries from actual local execution. No original archive address or material is disclosed. Adoption requires checking declared policy, server enforcement and rights independently.

Explore the implementation

Complete independent synthetic implementation

"""Relative synthetic routes; no crawler, server or search engine operation."""
import unicodedata
from urllib.parse import quote,unquote
def route(parts):
 if not isinstance(parts,list) or not 1<=len(parts)<=8: raise ValueError('bounded segments required')
 cleaned=[]
 for s in parts:
  if not isinstance(s,str) or not s or len(s)>80:raise ValueError('bounded text segment')
  s=unicodedata.normalize('NFC',s)
  if s in ('.','..') or any(c in s for c in '/\\?#%') or any(ord(c)<32 or ord(c)==127 for c in s):raise ValueError('unsafe segment')
  cleaned.append(s)
 return '/'+ '/'.join(quote(s,safe='-._~') for s in cleaned)+'/'
def manifest(rows):
 result=[];seen=set()
 for r in rows:
  if set(r)!={'segments','audience'} or r['audience'] not in ('public','archive','private'):raise ValueError('route contract')
  url=route(r['segments'])
  if url in seen:raise ValueError('duplicate normalized route')
  seen.add(url);aud=r['audience']
  result.append(dict(path=url,file=unquote(url).lstrip('/')+'index.html',audience=aud,indexable=aud=='public',sitemap=aud=='public',authentication_required=aud=='private'))
 return result
def reconcile(rows,files,sitemap):
 m=manifest(rows);expected_files={r['file'] for r in m};expected_urls={r['path'] for r in m if r['sitemap']}
 if len(files)!=len(set(files)) or len(sitemap)!=len(set(sitemap)):raise ValueError('duplicate output entries')
 return dict(missing_files=sorted(expected_files-set(files)),unexpected_files=sorted(set(files)-expected_files),missing_sitemap=sorted(expected_urls-set(sitemap)),unexpected_sitemap=sorted(set(sitemap)-expected_urls))

Detect an equal-count substitution

If one public route is expected but the sitemap contains one archive route instead, counts match while the result is wrong. Separate missing and unexpected sets reveal the substitution. File and discovery inventories are reconciled independently, so one successful list cannot stand in for the other.

The counterexample is inspectable through tests and saved execution records. Adoption requires checking input meaning and failure policy before changing labels. A small independent function does not replace an operational application.

Published code and ZIP use the same reviewed files. The central decision can be inspected without importing company records or running another system. Any added integration needs separate observed results; the existing package does not pre-certify its behavior.

Actual execution evidence and its boundary

The source folder and a fresh ZIP extraction each passed 8 tests. Actual example results are saved in records.json, and the published core can be compared with the download. Historical project completion messages and test totals were not reused as evidence of this execution.

The selector reads results saved by actual local runs; it does not execute Python or a server in the browser. These checks do not establish rendered-browser or physical-device behavior. An integrated service needs its own observed verification rather than inheriting a broader claim from these small tests.

Reads saved execution evidence; it does not run Python or a server in the browser.

Before adapting the download

The ZIP contains core implementation, tests, runner, saved results and guidance; live examples also include bilingual HTML. This is new synthetic code with permission to modify and reuse, without original customer images, operational records or credentials. It contains no instruction to execute the source business program or transmit its material.

Begin adoption by defining units, input provenance and failure messages for the actual workflow. Passing tests cannot certify all supplied facts or grant operational authority. Authentication, persistence, transmission and rendered-interface review remain outside the small contract. I share both a reusable implementation and the decisions an adopter still needs to make.

Download implementation, tests and examples
Independent synthetic code; modification and reuse permitted