# RAMA AG — Compact V2 Implementation Report

Prepared: 2026-11-28, Europe/Warsaw. Work continued from the existing Workforce Core release candidate. Version **1.1.2**, local tag `rama-workforce-core-v1.1.2`. **Candidate prepared; active deployment remains pending owner maintenance acceptance.** Concept approval authorizes the design work; it does not substitute for the previously required maintenance window and real-account/device smoke checks.

## Scope and environment

Development: `D:\- CLAUD PROJECTS\RAMA AG\dev-v1`. Active: `C:\Users\PANDAZZ\Desktop\RAMA-AG\rama-workforce-laravel`, port 3400, schema rama_workforce_laravel, MariaDB 127.0.0.1:3307. Identity checks used rama_local@127.0.0.1 for read-only active verification and rama_test@127.0.0.1 with rama_workforce_laravel_test for rollback fixtures. Only RAMA was accessed. No unrelated application, shared grant or server was changed.

TimeService, DurationEngine, TimeEngine, historical import calculations and all migration files are unchanged from the previous candidate. This is a presentation/export update, not another backend rebuild. The old compact Blade layout was retired; the original SMGV templates/structure remain functional. Small export-renderer resource cleanup and the RAMA-only start command accompany the visual work because browser acceptance exposed a local runtime memory limit issue.

## Visual design and comparison

Compact V2 uses the existing RAMA AG white logo on a small titanium header block, white paper, #18181B text, #52525B/#71717A secondary text, #E4E4E7 borders and #F4F4F5 surfaces. Positive balances use #15803D, negative balances #B91C1C and zero balances remain neutral. Professional German terminology, restrained rules, tabular numeric alignment, clear headings and blank signature/date areas replace the old side-by-side Basisblatt/Jahresübersicht composition.

The first page unifies employee/contact/contract information, six KPIs, a scheduled/productive bar comparison and January–December table, vacation movements and utilization, source-status legend, signatures and draft status. Productive and credited totals are explicitly different. Missing contact/AHV information is labelled, never fabricated. AHV remains available only through the existing administrator-authorized export path.

The supplementary annual page retains opening/rest/carry balances, day/night work, all supplements, travel/deductions, compensation, payouts, all absence categories, Karenz qualification, holiday dates, monthly Pensum/weekday factors and verification/source information. Decimal percentage precision is preserved while redundant trailing zeros are omitted in the narrow Pensum table. Detailed monthly category values remain on the monthly pages; the separate original layout retains the original annual matrix.

Comparison artifact: `D:\- CLAUD PROJECTS\RAMA AG\compact-v2\output\compact-v2-before-after.png`. It places the actual old A3 first page beside the new A4 first page without redrawing either. Individual rendered pages and contact sheets are protected under `compact-v2/evidence/reference/rendered`.

![Compact V1 and V2 comparison](<D:/- CLAUD PROJECTS/RAMA AG/compact-v2/output/compact-v2-before-after.png>)

## Paper sizes, sequence and page counts

| Export | Format | Pages per employee | Sequence |
|---|---|---:|---|
| RAMA Compact V2 full | A4 landscape throughout | 14 | Overview; January–December; supplementary annual accounts |
| RAMA Compact V2 annual only | A4 landscape | 2 | Overview; supplementary annual accounts |
| RAMA Compact V2 month | A4 landscape | 1 per selected month | Chronological selected months |
| SMGV Original full | A4 portrait basis + A4 landscape sheets | 14 | Original Basisblatt; January–December; Jahresübersicht |

All required information could not fit legibly into one new overview page. The first unchanged-information experiment overflowed even at A3, and the initial A4 attempt pushed the signature area to another page. The final design uses the explicitly authorized additional detail page rather than tiny text or omitted categories. This replaces the previous 13-page compact count with 14 consistent office-print A4 pages. Months remain on pages 2–13; supplementary information is page 14. The UI states the counts clearly. Original SMGV is preserved as a separate layout. Its structure is unchanged; the source-backed draft watermark is intentionally corrected in v1.1.1.

The overview uses 8.5 pt monthly data, 16 pt KPI values and larger headings; the detailed monthly grid uses 7.1 pt values, with 6–6.5 pt compact weekday/week/source notes. It retains all 31 daily columns, weekend and holiday differentiation, subtle yellow input cells, every absence/category row, aligned status cells, remarks, signatures, explicit totals and page numbering. The original layout's established typography is unchanged. Print at actual A4 landscape size, not reduced multiple-pages-per-sheet.

## Numerical validation and dynamic data

Only Avni Hoti's source pages 1–14 were used for reconciliation. The owner-supplied original path is `C:\Users\PANDAZZ\Downloads\smgv-zeitkontrolle-alle-2026.pdf` (the request's `(2)` name resolves to this previously supplied file), SHA-256 `60b475752329f317556852eec6865be9bad45cdc82dbfef32aa9cff7dc678e15`. No other employee was mixed into the reference.

All **561/561 comparisons** and 18 headline/month checks pass. Annual results: Soll 1,384.00 h; productive 1,250.00 h; credited including supplements 1,402.50 h; provisional year balance 18.50 h; holiday credit 48.00 h; vacation used 104.00 h; time opening 10.00 h; supplements 0.50 h; vacation available 142.70 h and remaining 38.70 h. January–August productive hours are 160.50 / 167.00 / 186.50 / 144.00 / 148.50 / 183.50 / 117.00 / 143.00; September–December are 0.00 outside the reference employment period. The calendar-week boundary behavior remains unchanged, including August 31 in the September-spanning week without adding September productive hours.

The additional live attendance minute in active Avni data is untouched; the reference fixture intentionally contains only reported source values. No active import, fabricated timestamp, account reset or closing rewrite occurred. Exact historical e4/source text remain preserved. The owner confirmed that the historical hours are verified against the supplied PDF. Source-hour provenance is now shown separately from pending automatic GAV-rule approval. Reports with historical sources no longer receive a blanket ENTWURF watermark; reports without historical sources retain their existing draft indication. This does not mark automatic rules or new live attendance as verified, close any month, or alter stored source status.

A second wholly synthetic employee, Mira Beispiel, has a different name, address, contact, birthday, March–November employment and six-hour contractual target. Its 14-page output confirms dynamic layout, missing versus future/outside status, negative balances and independent vacation values. This is not a second real employee import. Production templates contain no hardcoded Avni identity, totals or employment dates. Test imports/accounts roll back and create zero attendance events.

## Simplified export experience

Primary flow: select employee(s)/all, reporting year, one of full annual/annual overview/monthly, then preview/download. Advanced settings are collapsed and retain layout selection, PDF/Excel/ZIP, closed/draft source selection, selected multiple months, empty-month handling and Basisblatt compatibility. Native details controls preserve their open state across Livewire updates. ZIP/Excel continue to use full annual data; the UI states this explicitly. Generated downloads use the existing private audited route and descriptive compact_v2 filenames. Historical export records keep their original options and files.

The integrated viewer renders the exact generated PDF using locally bundled **PDF.js 6.5.438**, with page navigation, zoom, fit width, responsive scrolling, and separate download/open links. It is lazy-loaded only when a preview is displayed. Worker, standard-font data and Apache/license notices are shipped locally; no PDF or employee data goes to a CDN or external viewer. The official [PDF.js rendering examples](https://mozilla.github.io/pdf.js/examples/) informed the integration. npm reported zero known vulnerabilities at installation; that is a point-in-time audit, not a security certification.

Browser-native iframe PDF display was blank in the in-app browser, so the final implementation uses canvas rendering. The iframe experiment was removed and **X-Frame-Options DENY, frame-ancestors none and object-src none remain unchanged**. The renderer fetches only the same-origin administrator-protected PDF endpoint, with evaluation of PDF-provided code disabled. The preview ID is a locked Livewire property. Authorization, file integrity SHA checks, audit logging, private no-store caching and worker denial remain enforced.

## Visual and browser acceptance

All 42 generated pages (Avni V2 14, Avni Original 14, synthetic employee V2 14) were rendered at 120 dpi, checked for out-of-page characters, page sequence and expected employee/footer identifiers. Zero page-boundary violations were found. All new V2 page layouts were visually reviewed, with full-size inspection of overview, monthly and supplementary pages and contact-sheet review of the complete monthly sequences. Original retains all 14 pages and accounting rows. Its watermark removal and clarified source legend intentionally change its bytes from v1.1.0. The final source contains no removed accounting rows or generated signatures.

Isolated preview: port 3404, synthetic test rows in a rollback transaction per HTTP request, separate sessions and cached synthetic export metadata outside production. Desktop and 390×844 mobile, German and Albanian controls were reviewed. Observed select-all, report/layout choice, collapsed advanced options, real PDF canvas rendering, 1/2 → 2/2 navigation and 125% zoom for V2, plus 1/14 → 2/14 for Original. Horizontal PDF zoom scrolling remains inside the viewer; the mobile document did not overflow. The original-format preview was successfully rechecked after the runtime adjustment below. Browser viewport was reset and the temporary tab closed.

The final browser download-event capture expired in the automation connection, so successful native file arrival is **not claimed**. Backend download/redirect/MIME/authorization tests pass and the direct original PDF endpoint returned HTTP 200 with the expected 314,233-byte synthetic PDF. Real owner login, physical-device GPS and final production download smoke remain required at deployment.

## Regression and build results

The table records the complete v1.1.0 regression baseline. After the v1.1.1 source-label correction, all seven existing Compact V2 / Workforce Core / SMGV export cases passed (92 assertions). Pint and Blade clear/cache passed. Both Avni exports and the synthetic export were regenerated; all 42 pages were rendered again, the source-backed pages contain no ENTWURF label, the non-historical synthetic draft remains, and all 561 reference comparisons plus 18 headline checks still pass. No frontend assets or calculation formulas changed in this correction.

| Suite | Cases | Passed | Skipped | Assertions | Seconds |
|---|---:|---:|---:|---:|---:|
| main | 592 | 494 | 98 | 10473 | 89.666 |
| memory | 97 | 96 | 1 | 741 | 9.312 |
| schema | 2 | 2 | 0 | 76 | 0.357 |

All final suites have zero failures/errors. The memory suite overlaps main cases. The two deliberate distinct skips remain the unmigrated worksite fixture and optional manual HTML-preview capture; the 97 main memory-only skips are exercised separately. JavaScript runner: six passing entries including 30 timer checks. Vite production build, viewer JavaScript syntax, Pint, PHP lint, PowerShell start-script parse, Blade compilation, route cache/clear and git whitespace checks passed. No schema reset or destructive migration was run.

An overnight final run initially exposed four pre-existing wall-clock-dependent attendance UI/history tests: UTC and Zurich dates differed near midnight, and a 90-minute-before-now schedule crossed the local day boundary. Only the two test classes were given a deterministic midday clock; all 21 focused cases and the complete final suites then passed. Application attendance calculations were not changed. Failed-run evidence is retained rather than reported as successful.

## Runtime memory finding

At the local PHP server's default 128M limit, a full Original export succeeded at a higher per-export limit but a subsequent Livewire request exhausted 128M. This was reproduced; renderer-cycle/allocator cleanup alone did not make that configuration reliable. The final renderer explicitly releases Dompdf cycles after each fragment, and the RAMA start script sets a consistent **process-wide memory_limit=768M** with the existing Laravel public router on port 3400. It changes neither .env nor machine-wide PHP configuration. Actual active startup is not changed until maintenance approval.

The isolated preview server was restarted with that process limit and Original rendering/navigation plus subsequent polling succeeded. After the last failed 128M attempt, 555 logged requests at 768M completed without fatal errors; maximum recorded peak was 264.00 MB. This is a local acceptance observation, not a load/memory-capacity guarantee. Deployment preflight must use the reviewed start command and verify the runtime limit before reopening RAMA.

## Data preservation, backup and rollback

Initial protected backup: 50 tables, 32 triggers and 6862 rows, consistent read-only snapshot at 2026-11-27T19:40:48+00:00; source ZIP has 511 files with verified per-file hashes. Temporary-table recovery verified all 6,862 rows and 72 foreign-key relationships, zero mismatches and no existing tables reset. Full cold trigger installation/database recovery was not rehearsed. No persistent restore was performed.

Latest read-only check: 2026-11-27T23:06:53+00:00. Existing credential fields preserved: True; all original IDs/roles/statuses preserved: True. Counts:

- users: 11
- attendance_events: 6
- attendance_sessions: 1
- smgv_historical_values: 6427
- smgv_month_closings: 10
- smgv_contracts: 10
- material_orders: 0
- daily_work_reports: 0
- leave_requests: 0
- worksite_user: 3
- smgv_month_states: 12
- audit_logs: 83

All original baseline source/config/private files were compared against the protected source manifest. Legitimate audit/session/user timestamp changes during active use are distinguished from credential changes; newer records are never overwritten. Active preservation evidence lists any table deltas. The additional Avni live minute and all immutable closings remain preserved. No synthetic record is inserted into the active schema.

Application rollback is rehearsed in memory by overlaying the exact release source/deletions on the protected source map and restoring every baseline byte hash, including .env and private assets. A real rollback restores application code/assets/autoload/caches while preserving every current database record. Renew the backup/preflight at the eventual maintenance boundary; this implementation backup is not a substitute for that fresh recovery point.

## Versioned release and deployment status

Local v1.1.2 commit and annotated tag receipts, source SHA-256 manifest, compiled assets, local PDF.js fonts/worker/license, full patch and ZIP are under `D:\- CLAUD PROJECTS\RAMA AG\compact-v2`. Nothing is pushed or published. The full archive continues the earlier Workforce Core changes; its active baseline remains 7f1a499, while the V2 design baseline is local v1.0.0 commit 1b7f291. The manifest records exact final commit and checksums without a self-referential report hash.

**No active deployment, maintenance entry, migration or port-3400 restart occurred.** The concept was approved; owner confirmation of the RAMA-only maintenance window and availability for real login/device-GPS acceptance is still outstanding from the release instructions. On approval, renew backup and source/data comparison, enter RAMA maintenance, preserve .env/APP_KEY/private storage, apply reviewed source/assets, remove only the confirmed obsolete orchestration services, refresh autoload/caches, and start RAMA with the consistent 768M process limit on 3400. Verify health, real login, both roles/languages, reporting/download and owner GPS before leaving maintenance; otherwise roll back code while preserving current data. No database migration is expected.

Active URL remains `http://127.0.0.1:3400`; the candidate is not declared production-ready. Remaining limits: unverified automatic GAV/travel/vacation/Karenz/rounding rules remain explicitly separate from the verified historical source hours, exact historical precision is preserved, unusually long content fails with a readable layout message instead of omitted data, physical-device GPS is not simulated as real acceptance, and full cold database/trigger recovery remains unperformed.

## Deliverables

- `D:\- CLAUD PROJECTS\RAMA AG\compact-v2\output\pdf\RAMA_AG_Arbeitszeitkontrolle_Avni_Hoti_2026_compact_v2.pdf`
- `D:\- CLAUD PROJECTS\RAMA AG\compact-v2\output\pdf\RAMA_AG_Arbeitszeitkontrolle_Avni_Hoti_2026_original.pdf`
- `D:\- CLAUD PROJECTS\RAMA AG\dev-v1\RAMA_AG_COMPACT_V2_IMPLEMENTATION_REPORT.md`
- `D:\- CLAUD PROJECTS\RAMA AG\compact-v2\RAMA_Workforce_Core_v1.1.2.zip`, `release-manifest.json`, `SHA256SUMS`, `release-changes.patch`.

The protected synthetic PDF and Excel sample are alongside the requested PDFs. Private reference PDFs, previews, screenshots, backups, environment files and dependencies are excluded from the source release package.

compact_v2 PDF SHA-256: `8f06c39a572422eb98b871f6dba900778e71e6979407db842bdb6d67d448d288`.

original PDF SHA-256: `5daae29f0ac8e73f1c65510f34136fcf870f921a65a2c96d95914c9559912dfa`.

## v1.1.2 application notice clarification

The Albanian/German global notice no longer says that every value is provisional. Its title identifies calculation rules and its text explicitly distinguishes imported historical PDF hours from automatic calculations. The rules page explains its read-only purpose and that no action there is required for existing historical hours. No rule is marked verified, no calculation value or snapshot changes, and no active deployment occurs. Both translation files pass PHP lint, Blade clear/cache and whitespace checks pass. The six existing SMGV center smoke tests pass with 92 assertions. PDFs and frontend assets are unchanged from v1.1.1.
