Les - Combined Les Workbench

Combined Les Workbench

Les workstreams 0.1.0 · local single-user reference · no live integrations

Exact bytes first. New library content is Native-only even if larger. This workbench does not render documents; restore/export to open them in a suitable viewer.

Ready. Use localhost/HTTPS.

Input and exact restoration

Preservation and retrieval

Explicit saves only. Association text is a label, not permissions or a suite integration. Browser storage may be cleared.

Local backup and recovery

Plaintext backup, maximum 24 MiB; protect it. Recovery requires an empty library and never overwrites existing records.

Project authority, requirements and handoff
# Les Workstream Standard and Contribution Register

## Objective
Les is the school-first Essynce managed-document standard for the complete journey from intake through exact, authorized, usable retrieval years later. Not a JPEG replacement or a renamed generic compressor. Apps remain independent. Original backups are owner-managed separately. Exact restoration precedes compression goals; 40% is a corpus target, not guaranteed. New writes here store Native artifacts even when larger.

## Baseline and provenance
All modules derive from the supplied paste-3.txt engine, preserved in baseline/. Earlier generated foundation packages are unavailable in this execution session. This release is a new modular workbench generated from the supplied engine and the agreed requirements, NOT a recovered copy of the previous generated UI. Original library implementation remains in the baseline but is not the new preservation module. This package is the latest complete three-workstream package.

## Three workbenches, one source
1 preservation-retrieval.html imports existing Native artifacts, verifies them, saves immutable content-version records with mutable title/association metadata, restores exact versions, exports original/native bytes, and exports/verifies local backups.
2 compression-accuracy.html encodes files, verifies exact bytes, opens Native artifacts, measures savings/expansion and exports receipts. No library writes.
3 combined.html composes both modules with the same engine bytes and shared UI. Do not independently edit generated builds. Run python build.py after modifying sources.

The preservation build includes the common decoder engine (currently shipped as the whole engine), not an independent second decoder. Team ownership separates responsibility, not every bundled function. Each generated file is a distinct UI profile, not a secure role boundary. All modes are local single-user references. The three preservation-capable builds on the same origin share the new les-workstreams-v1 IndexedDB library; the older supplied app database is untouched. No old records are migrated.

## Contract and ownership
See project-manifest.json. Compression team owns src/les-engine.js. Preservation team owns src/les-preservation.js. Integration lead owns shared contract, UI and build generator. Neither team independently changes wire format, engine return schema or persistence schema. Combined build is generated, never manually merged. Keep tests, stable fixtures and a source hash inventory. Reject old/current contract mismatches during integration review. No automated release CI service is installed by this package.

## Foundation requirements
Mandatory core: preserve complete original bytes, including embedded pictures; exact verification; versioned decoding; explicit failures; no silent original-storage fallback; retained decoder and fixture compatibility. Native raw blocks are valid. Whole file preservation does not require image-specific compression.
Optional image-aware optimization must reconstruct exact original document bytes; disclose dependencies. Not implemented. External-resource discovery/capture must distinguish links from captured content and report incomplete capture. Not implemented. OCR/extraction/image search are derived, provenance-tracked and access-controlled, never substitutes for originals. Not implemented.
Shared-service profile must enforce actor and organization permissions on ingest, exact-version access, search, associations and export. A hash is never access authority. Not implemented. Local association field is merely a label, not integration.
Signing profile must preserve source, prepared, completed versions and evidence without silent rewriting or legal assurances. Not implemented. Retention profile must enforce approved holds/deletion rules and demonstrate long-term recovery of content, metadata, associations and decoder dependencies. Not implemented.
Observability profile needs persistent privacy-conscious operation diagnostics; current UI status and downloadable receipts are not a persistent operations dashboard. Resource exhaustion, malformed bounds, authorization, interruption/retry, compatibility, backup and exact-version tests remain required as applicable, with honest executed evidence.

## Current preservation implementation
New module, not the old library recovered. Repository injected for testability. Browser uses atomic IndexedDB state commit with revision check. Content-addressed artifacts remain Native. Immutable version records and mutable descriptive metadata. Backup is bounded plaintext JSON containing artifact bytes plus IDs and labels; imports only into empty library, rejects invalid hashes/links and does not overwrite existing state. No encryption, signatures, tamper-proof audit, multi-tenant grants, retention engine or malware validation. Entire library state and base64 backups are in memory; not scalable enterprise storage. Browser restore/backup checks run on main thread and may pause UI. Per-input engine limits retained; backup capped 24 MiB; no strict aggregate library quota. Browser storage is evictable. No automatic backups.

## Contributions
W-001 | founder direction + engineering | split workstream modules and generated three profiles | implemented | src/, build.py | novelty unassessed.
W-002 | engineering + established storage techniques | new injected-repository preservation module, version identity, checksummed objects and verified empty-store recovery | implemented; tests/results.json distinguishes Node from browser | replaces no production system | novelty unassessed.
W-003 | supplied implementation | original Native engine retained unchanged | baseline/ and src/les-engine.js | finite tests only | authorship beyond supplied comments and novelty unassessed.

## Format/dependencies
Engine 0.1.0; Native wire 1.0; 8 MiB source and 9 MiB artifact cap. Engine source is current precise wire implementation; normative independent field spec remains pending. Browser platform APIs and Node builtins only at runtime; no imported compression library. Unlike earlier supplied UI, these new workbenches do not load PDF.js or external scripts and do not render documents inline: download exact bytes to open in an appropriate viewer. No OCR, image extraction or specialty optimization. Original baseline optionally loads PDF.js, but it is not executed by these new builds. No novelty, ownership or legal guarantees.

## Next and safety
Run browser smoke tests with separate pages on the same localhost origin: encode, save, reload, choose exact version, update metadata, export, backup, recover in a separate empty origin and compare. Test failures and two-tab conflicts. Then inspect actual app code before building shared authorized service. Never deploy, delete, migrate real records, sign or upload sensitive data externally without approval. Use sanitized fixtures. Save ZIP externally; session files are not permanent. Distinguish proposed, implemented, executed and production verified.

## Executed checks in this release
20 Node checks passed: exact round trip, fresh-process decode, corruption/truncation, version separation/retrieval, metadata stability, expanding Native storage, backup content/association recovery, refusal of overwrite, backup mismatch and stale revision rejection, identical engines and no remote script imports in all three builds. This is not browser IndexedDB execution or complete adversarial verification. Fixture size comparisons differ with stored filename; current handbook.pdf metadata yields 1592 artifact bytes, not a compression improvement.
{
  "contract": "les-workstream-contract/1",
  "release": "les-workstreams-0.1.0",
  "engine": "0.1.0",
  "wire": "Native 1.0",
  "scope": "Local single-user reference; no live suite integration",
  "policy": "Native-only new writes; exact restoration; owner keeps separate originals",
  "ownership": {
    "src/les-engine.js": "Compression team; shared interface changes require coordination",
    "src/les-preservation.js": "Preservation team",
    "src/les-ui.js": "Integration lead",
    "build.py": "Integration lead"
  },
  "interface": {
    "engine": [
      "compress(Uint8Array,name,mime)",
      "restore(Uint8Array)",
      "inspect(Uint8Array)",
      "sha(Uint8Array)",
      "hex(Uint8Array)"
    ],
    "preservation": [
      "save(artifact,metadata,docId?)",
      "list()",
      "get(id)",
      "restoreVersion(docId,versionId)",
      "updateMetadata(id,patch)",
      "exportBackup()",
      "importBackup(bytes)"
    ]
  },
  "notImplemented": [
    "Enterprise authorization",
    "Live application integration",
    "Signing or retention enforcement",
    "External-resource capture",
    "OCR or image-specific compression",
    "Persistent operation telemetry",
    "Multi-user concurrency"
  ]
}