Files
compras/docs/proofs/audit-export-scope-proposal.json
T
nala 060c119ba1
tests / ci (push) Waiting to run
commit compras2 2811
2026-11-28 15:45:52 +02:00

146 lines
11 KiB
JSON

{
"date": "2026-11-27",
"status": "implemented_in_qa_functional_verification_passed_operational_activation_and_visual_pending",
"owner_private_family_decision_20261128": {
"exact_reply": "Compras, stock, finanças e configuração; bancos completos e Pessoas ficam separados",
"included": [
"purchasing",
"stock",
"finance",
"configuration"
],
"not_included": [
"complete_bank_identifiers",
"private_people_data_and_documents"
],
"effect": "Implement the dedicated private audit export for the four included families in QA. Complete bank identifiers stay masked/excluded; People private data/documents are outside this scope. No actual grants, operational export, installation or activation. Do not ask this scope again."
},
"owner_decision_20261128": {
"selected_choice": "dedicated_audit_scope",
"exact_reply": "Autoridade de auditoria própria para consultar conteúdo privado adicional",
"effect": "Implement a separate configurable audit authority; the existing metadata permission remains unchanged. No real user/profile grant, pilot installation or private data export is authorised by development.",
"remaining_configuration": "Private source families and designated audit profiles must be explicit in the company configuration; no implicit Admin/Finance/private-bank/personnel access."
},
"purpose": "Define the intended private-content scope of the matrix's integral audit export before extending a permission explicitly limited to metadata.",
"available_audits_explained_20261128": {
"current_event_audit": "Implemented: company event ID/date/action/actor ID, filters and complete CSV; includes events from purchasing, stock, People and configuration, but no private before/after payload or document bytes.",
"current_process_evidence": "Implemented through native process permissions: request history and cycles, frozen rules, decisions, quotations/evaluations, orders and linked documents. This is not a separate private auditor authority.",
"current_reconciliation_reports": "Implemented native operational/financial reports for purchasing, receipt/stock, budgets, invoices, confirmed external payments and explicit category attribution. No bank transfer execution or external audit certification is implied.",
"new_private_export": "Implemented in isolated synthetic QA for the four owner-selected families. Dedicated configurable per-family authority; no actual operational grants or activation."
},
"concrete_private_family_options_20261128": {
"base_purchasing_stock_finance_configuration": {
"purchasing": "Original/versioned requests, approval cycles and rules, production/maintenance origins, quotations, evaluations, awards, orders and authorised original documents.",
"stock": "Receipts, quantities, lots, quality, reservations, deliveries, returns and reversals with their native source links.",
"finance": "Budget allocations/reservations/commitments/consumption, invoices, outstanding amounts, confirmed external payments and explicit category allocations; bank identifiers remain masked unless the separate bank family is approved.",
"configuration": "Versioned business rules, profiles, memberships, delegations and recorded changes; passwords, tokens and secrets are excluded."
},
"optional_bank_identifiers": "Complete supplier bank identifiers and their independent verification history, as a separately configurable audit family.",
"optional_people_documents": "Private data and originals of the existing People/candidate/selection processes in their own work context. Does not invent formal employment contracts, payroll or the deferred formalisation workflow.",
"common_limits": "Company-configurable, separate audit permissions; no automatic Admin/Finance grant or operational installation. QA implementation/tests only, with synthetic data. Each included file is checked and covered by the export manifest; no blind AuditLog before/after dump."
},
"existing_authority": {
"permission": "audit_metadata_read",
"declared_scope": "Company-wide event ID, recorded date, action and user ID; no private payloads",
"source": "app/Services/OrganizationAccess.php and docs/auditoria-metadados.md",
"implemented": "Filtered full metadata CSV and independently authorised links to native processes. Existing native process/document permissions remain separate."
},
"choices": {
"native_scope": {
"description": "Export all process data and originals that this user can already consult through the native modules, together with authorised audit metadata.",
"authority": "Revalidate current identity, company, work context and each native process/document reader; audit_metadata_read alone never authorises a private item.",
"contents": "Original/versioned request and approval evidence, applicable frozen rules, native order/receipt/invoice/payment or People records and private originals only where their current native readers permit them. Preserve each module's field-level restrictions and separate work contexts. Never blindly serialise arbitrary AuditLog before/after payloads.",
"coverage": "Manifest distinguishes included sources and unavailable/restricted source families without revealing hidden record identities or counts. Unknown historical fields stay unknown; no reconstruction from current rules."
},
"dedicated_audit_scope": {
"description": "Create a distinct company-configurable audit authority to read/export private content beyond the user's ordinary process access.",
"authority": "Requires the owner to define included modules/private data and explicitly designated audit profiles. It is not implied by Admin or the existing metadata permission. No actual grant would be created by development or this choice.",
"contents": "Only the private families explicitly defined by the owner; bank identifiers, personnel records and originals must be identified within that definition rather than inferred."
},
"metadata_only": {
"description": "The required integral export is all authorised event metadata, not a private-content dossier.",
"effect": "Retain the demonstrated full filtered metadata export and native process links; remove the unrequested private-export obligation from the existing matrix without relabelling metadata as a private payload export."
}
},
"common_implementation_requirements": [
"Private downloadable artifact with versioned coverage manifest, collection time and verified hashes for included original bytes; no publication or external transmission",
"Original data, approvals, versions and native audit remain unchanged; no payment, stock or financial effects",
"Current authorisation checked at generation/download, company/work-context isolation, maintenance and revoked/expired grants refused",
"QA validation with synthetic data: allowed/restricted sources, missing or altered originals, all-page completeness, stable evidence, failure/cleanup and no duplicate business effects",
"No claim of legal certification, absolute SQL-administrator protection or a new retention period; the existing indefinite preservation decision remains"
],
"not_authorised_by_this_definition": [
"Operational grants or role changes, pilot/SGF installation, migration or activation",
"Bypassing a native reader, broadening metadata authority silently or exporting real private data",
"Automatic disclosure, email, publication, destructive source cleanup or changing the two products' independence"
],
"existing_pilot_access_proposal": "audit-access-proposal.json remains a separate unapplied grant proposal; this scope question does not replace or approve it.",
"implementation_qa_20261128": {
"authority": "Four independent explicit private audit permissions; no Admin, Finance or metadata fallback; current actor, tenant, work context, expiry and maintenance revalidated.",
"source_contract": "109 fixed allowlisted tables plus curated events and explicit SupplyRecord kinds; standalone financial rows scoped to tenant/company0/unit0. Optional absent sources explicitly not_installed, records null; legacy missing columns identified. No new balance calculations.",
"package": "Immutable private ZIP and manifest; NDJSON all-page stable source snapshot; original source hashes verified; SHA256 and exact size; operation UUID bound to actor/context/scope/purpose; replay preserved; partial owned files cleaned individually.",
"excluded": [
"complete bank registers and structured bank coordinates",
"bank-specific import originals",
"private People data and originals",
"credentials",
"arbitrary event payloads",
"native storage paths"
],
"original_semantics": "Ordinary authorised business originals retain exact bytes; no claim to redact arbitrary free text or certify documents.",
"sqlite": {
"tests": 15,
"passed": 15,
"assertions": 493
},
"postgresql": {
"tests": 15,
"passed": 15,
"assertions": 493,
"database": "compras_receipts_test_3c9809d21aab",
"removed": true
},
"frontend": {
"tests": 24,
"files": 2,
"passed": 24
},
"native_http": {
"checks": 270,
"fortify_sessions": 4,
"readonly_tables_equal": 138,
"verified_assets": 20,
"audit_export_posts_including_replay": 2,
"business_commands": 0,
"zip_download_sha256_verified": true,
"isolated_database_and_role_removed": true
},
"static": "PHPStan zero errors; types, targeted frontend check, Pint and private build passed. Final Files parent containment hardening followed by SQLite13/482 and PHPStan0.",
"build": {
"path": "storage/framework/testing/sgc-private-audit-help-qa-20261128",
"manifest_sha256": "fa87e37a3626ef75d22b5248dce9a0af2bad68c967e6f99bb64bc426a68f6aaf",
"entries": 183,
"missing_files_or_imports": 0
},
"limits": "QA only; no pilot migration, actual grants, activation, SGF writes or visual/mobile/physical print acceptance. People formalisation remains deferred.",
"help_delta": {
"frontend_tests": 10,
"files": 2,
"all_operational_pages_have_specific_help": true,
"pages": [
"audit/private",
"requisitions/operational-orders",
"requisitions/urgent-stock"
],
"types_and_targeted_check": "passed"
},
"corrections_and_regressions": [
"Import document metadata kind added to the allowlist; ordinary documentary versions preserved, typed banking documents still excluded.",
"SupplyRecord JSON explicitly decoded on SQLite as well as PostgreSQL before recursive redaction; nested native paths cannot escape as raw JSON strings.",
"Same-company fully authorised auditors cannot read another creator package.",
"Output parent components reject symlinks and must remain within the owned private QA storage."
],
"pilot_manifest_sha256": "1edb9ab0aa62fcf4e9c9075ce6e405de5435dc8ea4799d1949535a96c718df4e"
}
}